Example #1
0
        private void SetElementViewModel(string name, object model, System.Windows.Documents.FlowDocument document)
        {
            if (document == null)
            {
                return;
            }
            var element = document.FindName(name) as FrameworkElement;

            if (element == null)
            {
                return;
            }
            element.DataContext = model;
        }
        private void LoadDataForFlowDocument(FlowDocument page, ShortFormReport reportModel)
        {
            if (reportModel != null)
            {
                var textBlock1 = page.FindName("dataClientNum") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataClientNum;
                }
                textBlock1 = page.FindName("dataUserCode") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataUserCode;
                }
                textBlock1 = page.FindName("dataScreenDate") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataScreenDate;
                }
                textBlock1 = page.FindName("dataName") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataName;
                }
                textBlock1 = page.FindName("dataAge") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataAge;
                }
                textBlock1 = page.FindName("dataHeight") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataHeight;
                }
                textBlock1 = page.FindName("dataWeight") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataWeight;
                }
                textBlock1 = page.FindName("dataScreenLocation") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataScreenLocation;
                }
                textBlock1 = page.FindName("dataMobile") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataMobile;
                }
                textBlock1 = page.FindName("dataEmail") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataEmail;
                }
                textBlock1 = page.FindName("dataLeftBreast") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftBreast;
                }
                textBlock1 = page.FindName("dataRightBreast") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightBreast;
                }
                textBlock1 = page.FindName("dataLeftPalpableMass") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftPalpableMass;
                }
                textBlock1 = page.FindName("dataRightPalpableMass") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightPalpableMass;
                }
                textBlock1 = page.FindName("dataLeftChangesOfElectricalConductivity") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftChangesOfElectricalConductivity;
                }
                textBlock1 = page.FindName("dataRightChangesOfElectricalConductivity") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightChangesOfElectricalConductivity;
                }
                textBlock1 = page.FindName("dataLeftMammaryStruct") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMammaryStruct;
                }
                textBlock1 = page.FindName("dataRightMammaryStruct") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMammaryStruct;
                }
                textBlock1 = page.FindName("dataLeftLactiferousSinusZone") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftLactiferousSinusZone;
                }
                textBlock1 = page.FindName("dataRightLactiferousSinusZone") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightLactiferousSinusZone;
                }
                textBlock1 = page.FindName("dataLeftMammaryContour") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMammaryContour;
                }
                textBlock1 = page.FindName("dataRightMammaryContour") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMammaryContour;
                }
                textBlock1 = page.FindName("dataLeftNumber") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftNumber;
                }
                textBlock1 = page.FindName("dataRightNumber") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightNumber;
                }
                textBlock1 = page.FindName("dataLeftLocation") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftLocation) ? "Nil" : reportModel.DataLeftLocation;
                }
                textBlock1 = page.FindName("dataRightLocation") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightLocation) ? "Nil" : reportModel.DataRightLocation;
                }
                textBlock1 = page.FindName("dataLeftSize") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftSize) ? "Nil" : reportModel.DataLeftSize;
                }
                textBlock1 = page.FindName("dataRightSize") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightSize) ? "Nil" : reportModel.DataRightSize;
                }
                textBlock1 = page.FindName("dataLeftShape") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftShape) ? "Nil" : reportModel.DataLeftShape;
                }
                textBlock1 = page.FindName("dataRightShape") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightShape) ? "Nil" : reportModel.DataRightShape;
                }
                textBlock1 = page.FindName("dataLeftContourAroundFocus") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftContourAroundFocus) ? "Nil" : reportModel.DataLeftContourAroundFocus;                    
                }
                textBlock1 = page.FindName("dataRightContourAroundFocus") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightContourAroundFocus) ? "Nil" : reportModel.DataRightContourAroundFocus;                    
                }
                textBlock1 = page.FindName("dataLeftInternalElectricalStructure") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftInternalElectricalStructure) ? "Nil" : reportModel.DataLeftInternalElectricalStructure;                    
                }
                textBlock1 = page.FindName("dataRightInternalElectricalStructure") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightInternalElectricalStructure) ? "Nil" : reportModel.DataRightInternalElectricalStructure;                    
                }
                textBlock1 = page.FindName("dataLeftSurroundingTissues") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftSurroundingTissues) ? "Nil" : reportModel.DataLeftSurroundingTissues;                    
                }
                textBlock1 = page.FindName("dataRightSurroundingTissues") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightSurroundingTissues) ? "Nil" : reportModel.DataRightSurroundingTissues;                    
                }
                textBlock1 = page.FindName("dataLeftLocation2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftLocation2) ? "Nil" : reportModel.DataLeftLocation2;                    
                }
                textBlock1 = page.FindName("dataRightLocation2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightLocation2) ? "Nil" : reportModel.DataRightLocation2;                    
                }
                textBlock1 = page.FindName("dataLeftSize2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftSize2) ? "Nil" : reportModel.DataLeftSize2;                    
                }
                textBlock1 = page.FindName("dataRightSize2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightSize2) ? "Nil" : reportModel.DataRightSize2;                    
                }
                textBlock1 = page.FindName("dataLeftShape2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftShape2) ? "Nil" : reportModel.DataLeftShape2;                    
                }
                textBlock1 = page.FindName("dataRightShape2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightShape2) ? "Nil" : reportModel.DataRightShape2;                    
                }
                textBlock1 = page.FindName("dataLeftContourAroundFocus2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftContourAroundFocus2) ? "Nil" : reportModel.DataLeftContourAroundFocus2;                    
                }
                textBlock1 = page.FindName("dataRightContourAroundFocus2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightContourAroundFocus2) ? "Nil" : reportModel.DataRightContourAroundFocus2;                    
                }
                textBlock1 = page.FindName("dataLeftInternalElectricalStructure2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftInternalElectricalStructure2) ? "Nil" : reportModel.DataLeftInternalElectricalStructure2;                    
                }
                textBlock1 = page.FindName("dataRightInternalElectricalStructure2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightInternalElectricalStructure2) ? "Nil" : reportModel.DataRightInternalElectricalStructure2;                    
                }
                textBlock1 = page.FindName("dataLeftSurroundingTissues2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftSurroundingTissues2) ? "Nil" : reportModel.DataLeftSurroundingTissues2;                    
                }
                textBlock1 = page.FindName("dataRightSurroundingTissues2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightSurroundingTissues2) ? "Nil" : reportModel.DataRightSurroundingTissues2;                    
                }
                textBlock1 = page.FindName("dataLeftLocation3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftLocation3) ? "Nil" : reportModel.DataLeftLocation3;                    
                }
                textBlock1 = page.FindName("dataRightLocation3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightLocation3) ? "Nil" : reportModel.DataRightLocation3;                    
                }
                textBlock1 = page.FindName("dataLeftSize3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftSize3) ? "Nil" : reportModel.DataLeftSize3;                    
                }
                textBlock1 = page.FindName("dataRightSize3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightSize3) ? "Nil" : reportModel.DataRightSize3;                    
                }
                textBlock1 = page.FindName("dataLeftShape3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftShape3) ? "Nil" : reportModel.DataLeftShape3;                    
                }
                textBlock1 = page.FindName("dataRightShape3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightShape3) ? "Nil" : reportModel.DataRightShape3;                    
                }
                textBlock1 = page.FindName("dataLeftContourAroundFocus3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftContourAroundFocus3) ? "Nil" : reportModel.DataLeftContourAroundFocus3;                    
                }
                textBlock1 = page.FindName("dataRightContourAroundFocus3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightContourAroundFocus3) ? "Nil" : reportModel.DataRightContourAroundFocus3;                    
                }
                textBlock1 = page.FindName("dataLeftInternalElectricalStructure3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftInternalElectricalStructure3) ? "Nil" : reportModel.DataLeftInternalElectricalStructure3;                    
                }
                textBlock1 = page.FindName("dataRightInternalElectricalStructure3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightInternalElectricalStructure3) ? "Nil" : reportModel.DataRightInternalElectricalStructure3;                    
                }
                textBlock1 = page.FindName("dataLeftSurroundingTissues3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataLeftSurroundingTissues3) ? "Nil" : reportModel.DataLeftSurroundingTissues3;                    
                }
                textBlock1 = page.FindName("dataRightSurroundingTissues3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataRightSurroundingTissues3) ? "Nil" : reportModel.DataRightSurroundingTissues3;                    
                }
                textBlock1 = page.FindName("dataLeftOncomarkerHighlightBenignChanges") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftOncomarkerHighlightBenignChanges;
                }
                textBlock1 = page.FindName("dataRightOncomarkerHighlightBenignChanges") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightOncomarkerHighlightBenignChanges;
                }
                textBlock1 = page.FindName("dataLeftOncomarkerHighlightSuspiciousChanges") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftOncomarkerHighlightSuspiciousChanges;
                }
                textBlock1 = page.FindName("dataRightOncomarkerHighlightSuspiciousChanges") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightOncomarkerHighlightSuspiciousChanges;
                }
                textBlock1 = page.FindName("dataLeftMeanElectricalConductivity1") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMeanElectricalConductivity1;
                }
                textBlock1 = page.FindName("dataRightMeanElectricalConductivity1") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMeanElectricalConductivity1;
                }
                textBlock1 = page.FindName("dataLeftMeanElectricalConductivity2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMeanElectricalConductivity2;
                }
                textBlock1 = page.FindName("dataRightMeanElectricalConductivity2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMeanElectricalConductivity2;
                }
                textBlock1 = page.FindName("dataMeanElectricalConductivity3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataMeanElectricalConductivity3;
                }
                textBlock1 = page.FindName("dataLeftMeanElectricalConductivity3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMeanElectricalConductivity3;
                }
                textBlock1 = page.FindName("dataRightMeanElectricalConductivity3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMeanElectricalConductivity3;
                }
                textBlock1 = page.FindName("dataLeftComparativeElectricalConductivity1") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftComparativeElectricalConductivity1;
                }
                textBlock1 = page.FindName("dataLeftComparativeElectricalConductivity2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftComparativeElectricalConductivity2;
                }
                textBlock1 = page.FindName("dataComparativeElectricalConductivity3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataComparativeElectricalConductivity3;
                }
                textBlock1 = page.FindName("dataLeftComparativeElectricalConductivity3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftComparativeElectricalConductivity3;
                }
                textBlock1 = page.FindName("dataLeftDivergenceBetweenHistograms1") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftDivergenceBetweenHistograms1;
                }
                textBlock1 = page.FindName("dataLeftDivergenceBetweenHistograms2") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftDivergenceBetweenHistograms2;
                }
                textBlock1 = page.FindName("dataDivergenceBetweenHistograms3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataDivergenceBetweenHistograms3;
                }
                textBlock1 = page.FindName("dataLeftDivergenceBetweenHistograms3") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftDivergenceBetweenHistograms3;
                }
                textBlock1 = page.FindName("dataLeftComparisonWithNorm") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftComparisonWithNorm;
                }
                textBlock1 = page.FindName("dataRightComparisonWithNorm") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightComparisonWithNorm;
                }
                textBlock1 = page.FindName("dataLeftPhaseElectricalConductivity") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftPhaseElectricalConductivity;
                }
                textBlock1 = page.FindName("dataRightPhaseElectricalConductivity") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightPhaseElectricalConductivity;
                }
                textBlock1 = page.FindName("dataAgeElectricalConductivityReference") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataAgeElectricalConductivityReference;
                }
                textBlock1 = page.FindName("dataLeftAgeElectricalConductivity") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftAgeElectricalConductivity;
                }
                textBlock1 = page.FindName("dataRightAgeElectricalConductivity") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightAgeElectricalConductivity;
                }
                textBlock1 = page.FindName("dataExamConclusion") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataExamConclusion;
                }
                textBlock1 = page.FindName("dataLeftMammaryGland") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMammaryGland;
                }

                textBlock1 = page.FindName("dataLeftMeanECOfLesion") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMeanECOfLesion;
                }
                
                textBlock1 = page.FindName("dataLeftAgeRelated") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftAgeRelated;
                }
                
                textBlock1 = page.FindName("dataLeftMammaryGlandResult") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftMammaryGlandResult;
                }
                textBlock1 = page.FindName("dataRightMammaryGland") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMammaryGland;
                }

                textBlock1 = page.FindName("dataRightMeanECOfLesion") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMeanECOfLesion;
                }
                
                textBlock1 = page.FindName("dataRightAgeRelated") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightAgeRelated;
                }
                
                textBlock1 = page.FindName("dataRightMammaryGlandResult") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightMammaryGlandResult;
                }
                textBlock1 = page.FindName("dataTotalPts") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataTotalPts;
                }
                textBlock1 = page.FindName("dataLeftTotalPts") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftTotalPts;
                }
                textBlock1 = page.FindName("dataRightTotalPts") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightTotalPts;
                }
                textBlock1 = page.FindName("dataPoint") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataPoint;
                }
                textBlock1 = page.FindName("dataBiRadsCategory") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataBiRadsCategory;
                }
                textBlock1 = page.FindName("dataLeftBiRadsCategory") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataLeftBiRadsCategory;
                }
                textBlock1 = page.FindName("dataRightBiRadsCategory") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRightBiRadsCategory;
                }
                textBlock1 = page.FindName("dataRecommendation") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataRecommendation;
                }
                textBlock1 = page.FindName("dataFurtherExam") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataFurtherExam) ? "N/A" : reportModel.DataFurtherExam;
                }
                textBlock1 = page.FindName("dataConclusion") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataConclusion;
                }
                textBlock1 = page.FindName("dataComments") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = string.IsNullOrEmpty(reportModel.DataComments) ? "N/A" : reportModel.DataComments;
                }
                textBlock1 = page.FindName("dataMeikTech") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataMeikTech;
                }
                textBlock1 = page.FindName("dataDoctor") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataDoctor;
                }
                textBlock1 = page.FindName("dataSignDate") as TextBlock;
                if (textBlock1 != null)
                {
                    textBlock1.Text = reportModel.DataSignDate;
                }            

                if(!string.IsNullOrEmpty(reportModel.DataLeftLocation)&&page.FindName("L1_Canvas")!=null){

                    if (reportModel.DataLeftLocation.StartsWith("12"))
                    {
                        textBlock1 = page.FindName("L1_12") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("11"))
                    {
                        textBlock1 = page.FindName("L1_11") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("10"))
                    {
                        textBlock1 = page.FindName("L1_10") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("9"))
                    {
                        textBlock1 = page.FindName("L1_9") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("8"))
                    {
                        textBlock1 = page.FindName("L1_8") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("7"))
                    {
                        textBlock1 = page.FindName("L1_7") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("6"))
                    {
                        textBlock1 = page.FindName("L1_6") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("5"))
                    {
                        textBlock1 = page.FindName("L1_5") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("4"))
                    {
                        textBlock1 = page.FindName("L1_4") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("3"))
                    {
                        textBlock1 = page.FindName("L1_3") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("2"))
                    {
                        textBlock1 = page.FindName("L1_2") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation.StartsWith("1"))
                    {
                        textBlock1 = page.FindName("L1_1") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    if ("L1".Equals(reportModel.DataLeftMaxFlag))
                    {
                        textBlock1.Text = "●";
                    }
                }                

                if (!string.IsNullOrEmpty(reportModel.DataRightLocation) && page.FindName("L1_Canvas") != null)
                {
                    if (reportModel.DataRightLocation.StartsWith("12"))
                    {
                        textBlock1 = page.FindName("R1_12") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("11"))
                    {
                        textBlock1 = page.FindName("R1_11") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("10"))
                    {
                        textBlock1 = page.FindName("R1_10") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("9"))
                    {
                        textBlock1 = page.FindName("R1_9") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("8"))
                    {
                        textBlock1 = page.FindName("R1_8") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("7"))
                    {
                        textBlock1 = page.FindName("R1_7") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("6"))
                    {
                        textBlock1 = page.FindName("R1_6") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("5"))
                    {
                        textBlock1 = page.FindName("R1_5") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("4"))
                    {
                        textBlock1 = page.FindName("R1_4") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("3"))
                    {
                        textBlock1 = page.FindName("R1_3") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("2"))
                    {
                        textBlock1 = page.FindName("R1_2") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation.StartsWith("1"))
                    {
                        textBlock1 = page.FindName("R1_1") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    if ("R1".Equals(reportModel.DataRightMaxFlag))
                    {
                        textBlock1.Text = "●";
                    }

                }                

                if (!string.IsNullOrEmpty(reportModel.DataLeftLocation2) && page.FindName("L1_Canvas") != null)
                {
                    if (reportModel.DataLeftLocation2.StartsWith("12"))
                    {
                        textBlock1 = page.FindName("L2_12") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("11"))
                    {
                        textBlock1 = page.FindName("L2_11") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("10"))
                    {
                        textBlock1 = page.FindName("L2_10") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("9"))
                    {
                        textBlock1 = page.FindName("L2_9") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("8"))
                    {
                        textBlock1 = page.FindName("L2_8") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("7"))
                    {
                        textBlock1 = page.FindName("L2_7") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("6"))
                    {
                        textBlock1 = page.FindName("L2_6") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("5"))
                    {
                        textBlock1 = page.FindName("L2_5") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("4"))
                    {
                        textBlock1 = page.FindName("L2_4") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("3"))
                    {
                        textBlock1 = page.FindName("L2_3") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("2"))
                    {
                        textBlock1 = page.FindName("L2_2") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation2.StartsWith("1"))
                    {
                        textBlock1 = page.FindName("L2_1") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    if ("L2".Equals(reportModel.DataLeftMaxFlag))
                    {
                        textBlock1.Text = "●";
                    }

                }                

                if (!string.IsNullOrEmpty(reportModel.DataRightLocation2) && page.FindName("L1_Canvas") != null)
                {
                    if (reportModel.DataRightLocation2.StartsWith("12"))
                    {
                        textBlock1 = page.FindName("R2_12") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("11"))
                    {
                        textBlock1 = page.FindName("R2_11") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("10"))
                    {
                        textBlock1 = page.FindName("R2_10") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("9"))
                    {
                        textBlock1 = page.FindName("R2_9") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("8"))
                    {
                        textBlock1 = page.FindName("R2_8") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("7"))
                    {
                        textBlock1 = page.FindName("R2_7") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("6"))
                    {
                        textBlock1 = page.FindName("R2_6") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("5"))
                    {
                        textBlock1 = page.FindName("R2_5") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("4"))
                    {
                        textBlock1 = page.FindName("R2_4") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("3"))
                    {
                        textBlock1 = page.FindName("R2_3") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("2"))
                    {
                        textBlock1 = page.FindName("R2_2") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation2.StartsWith("1"))
                    {
                        textBlock1 = page.FindName("R2_1") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    if ("R2".Equals(reportModel.DataRightMaxFlag))
                    {
                        textBlock1.Text = "●";
                    }

                }                

                if (!string.IsNullOrEmpty(reportModel.DataLeftLocation3) && page.FindName("L1_Canvas") != null)
                {
                    if (reportModel.DataLeftLocation3.StartsWith("12"))
                    {
                        textBlock1 = page.FindName("L3_12") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("11"))
                    {
                        textBlock1 = page.FindName("L3_11") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("10"))
                    {
                        textBlock1 = page.FindName("L3_10") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("9"))
                    {
                        textBlock1 = page.FindName("L3_9") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("8"))
                    {
                        textBlock1 = page.FindName("L3_8") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("7"))
                    {
                        textBlock1 = page.FindName("L3_7") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("6"))
                    {
                        textBlock1 = page.FindName("L3_6") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("5"))
                    {
                        textBlock1 = page.FindName("L3_5") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("4"))
                    {
                        textBlock1 = page.FindName("L3_4") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("3"))
                    {
                        textBlock1 = page.FindName("L3_3") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("2"))
                    {
                        textBlock1 = page.FindName("L3_2") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataLeftLocation3.StartsWith("1"))
                    {
                        textBlock1 = page.FindName("L3_1") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    if ("L3".Equals(reportModel.DataLeftMaxFlag))
                    {
                        textBlock1.Text = "●";
                    }
                }
                

                if (!string.IsNullOrEmpty(reportModel.DataRightLocation3) &&page.FindName("L1_Canvas") != null)
                {
                    if (reportModel.DataRightLocation3.StartsWith("12"))
                    {
                        textBlock1 = page.FindName("R3_12") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("11"))
                    {
                        textBlock1 = page.FindName("R3_11") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("10"))
                    {
                        textBlock1 = page.FindName("R3_10") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("9"))
                    {
                        textBlock1 = page.FindName("R3_9") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("8"))
                    {
                        textBlock1 = page.FindName("R3_8") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("7"))
                    {
                        textBlock1 = page.FindName("R3_7") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("6"))
                    {
                        textBlock1 = page.FindName("R3_6") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("5"))
                    {
                        textBlock1 = page.FindName("R3_5") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("4"))
                    {
                        textBlock1 = page.FindName("R3_4") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("3"))
                    {
                        textBlock1 = page.FindName("R3_3") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("2"))
                    {
                        textBlock1 = page.FindName("R3_2") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    else if (reportModel.DataRightLocation3.StartsWith("1"))
                    {
                        textBlock1 = page.FindName("R3_1") as TextBlock;
                        textBlock1.Visibility = Visibility.Visible;
                    }
                    if ("R3".Equals(reportModel.DataRightMaxFlag))
                    {
                        textBlock1.Text = "●";
                    }

                }                
            }
        }