public XElement GetReportDocument(string masterAccessionNo) { YellowstonePathology.YpiConnect.Contract.Flow.FlowAccessionCollection flowAccessionCollection = this.GetFlowAccession(masterAccessionNo); YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowAccessionReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowAccessionReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowAccession)); flowAccessionCollection[0].ReadProperties(flowAccessionReader); XElement accessionDocument = flowAccessionReader.Document; YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowLLPReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowLLPReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowLeukemia)); YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma)flowAccessionCollection[0].PanelSetOrderCollection[0]; YellowstonePathology.YpiConnect.Contract.Flow.FlowLeukemia flowLeukemia = new Contract.Flow.FlowLeukemia(panelSetOrderLeukemiaLymphoma); flowLeukemia.ReadProperties(flowLLPReader); accessionDocument.Add(flowLLPReader.Document); XElement markerCollectionElement = new XElement("FlowMarkerCollection"); accessionDocument.Add(markerCollectionElement); foreach (YellowstonePathology.YpiConnect.Contract.Flow.FlowMarker flowMarker in panelSetOrderLeukemiaLymphoma.FlowMarkerCollection) { YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowMarkerReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowMarkerReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowMarker)); flowMarker.ReadProperties(flowMarkerReader); markerCollectionElement.Add(flowMarkerReader.Document); } XElement reportDistributionCollectionElement = this.GetReportDistributionByMasterAccessionNo(masterAccessionNo); accessionDocument.Add(reportDistributionCollectionElement); XElement casehistoryElement = this.GetCaseHistoryDocument(masterAccessionNo); accessionDocument.Add(casehistoryElement); return(accessionDocument); }
public XElement GetReportDocument(string masterAccessionNo) { YellowstonePathology.YpiConnect.Contract.Flow.FlowAccessionCollection flowAccessionCollection = this.GetFlowAccession(masterAccessionNo); YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowAccessionReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowAccessionReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowAccession)); flowAccessionCollection[0].ReadProperties(flowAccessionReader); XElement accessionDocument = flowAccessionReader.Document; YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowLLPReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowLLPReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowLeukemia)); YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma panelSetOrderLeukemiaLymphoma = (YellowstonePathology.YpiConnect.Contract.Domain.PanelSetOrderLeukemiaLymphoma)flowAccessionCollection[0].PanelSetOrderCollection[0]; YellowstonePathology.YpiConnect.Contract.Flow.FlowLeukemia flowLeukemia = new Contract.Flow.FlowLeukemia(panelSetOrderLeukemiaLymphoma); flowLeukemia.ReadProperties(flowLLPReader); accessionDocument.Add(flowLLPReader.Document); XElement markerCollectionElement = new XElement("FlowMarkerCollection"); accessionDocument.Add(markerCollectionElement); foreach (YellowstonePathology.YpiConnect.Contract.Flow.FlowMarker flowMarker in panelSetOrderLeukemiaLymphoma.FlowMarkerCollection) { YellowstonePathology.Business.Domain.Persistence.SqlXmlPropertyReader flowMarkerReader = new Business.Domain.Persistence.SqlXmlPropertyReader(); flowMarkerReader.Initialize(typeof(YellowstonePathology.YpiConnect.Contract.Flow.FlowMarker)); flowMarker.ReadProperties(flowMarkerReader); markerCollectionElement.Add(flowMarkerReader.Document); } XElement reportDistributionCollectionElement = this.GetReportDistributionByMasterAccessionNo(masterAccessionNo); accessionDocument.Add(reportDistributionCollectionElement); XElement casehistoryElement = this.GetCaseHistoryDocument(masterAccessionNo); accessionDocument.Add(casehistoryElement); return accessionDocument; }