Example #1
0
        public static XElement GetOrderComments(string masterAccessionNo)
        {
            MySqlCommand cmd = new MySqlCommand();

            cmd.CommandText = "Select * from tblOrderCommentLog where MasterAccessionNo = @MasterAccessionNo;";
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.AddWithValue("@MasterAccessionNo", masterAccessionNo);

            XElement result = new XElement("OrderComments");

            using (MySqlConnection cn = new MySqlConnection(YellowstonePathology.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (MySqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Domain.OrderCommentLog orderCommentLog = new Domain.OrderCommentLog();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter propertyWriter = new Business.Persistence.SqlDataReaderPropertyWriter(orderCommentLog, dr);
                        propertyWriter.WriteProperties();
                        XElement comment = new XElement("OrderComment");
                        YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new Persistence.XmlPropertyReader(orderCommentLog, comment);

                        xmlPropertyReader.Write();

                        result.Add(comment);
                    }
                }
            }

            return(result);
        }
Example #2
0
        public static XElement GetSpecimenOrder(string masterAccessionNo)
        {
            XElement result = new XElement("SpecimenOrders");

            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblSpecimenOrder where MasterAccessionno = '" + masterAccessionNo + "' order by SpecimenNumber";
            cmd.CommandType = CommandType.Text;

            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
						YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = new Specimen.Model.SpecimenOrder();
                        XElement specimenOrderElement = new XElement("SpecimenOrder");
						YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(specimenOrder, dr);
						sqlDataReaderPropertyWriter.WriteProperties();

						YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new Persistence.XmlPropertyReader(specimenOrder, specimenOrderElement);
						xmlPropertyReader.Write();
						result.Add(specimenOrderElement);
                    }
                }               
            }

            return result;
        }
Example #3
0
        public XElement AsXML()
        {
            XElement clientOrderDetailAliquotElement = new XElement("ClientOrderDetailAliquot");

            YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailAliquotPropertyWriter = new Persistence.XmlPropertyReader(this, clientOrderDetailAliquotElement);
            clientOrderDetailAliquotPropertyWriter.Write();
            return(clientOrderDetailAliquotElement);
        }
Example #4
0
        public XElement AsXML()
        {
            XElement clientOrderDetailElement = new XElement("ClientOrderDetail");

            YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(this, clientOrderDetailElement);
            clientOrderDetailPropertyWriter.Write();

            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetailAliquot clientOrderDetailAliquot in this.ClientOrderDetailAliquotCollection)
            {
                XElement clientOrderDetailAliquotElement = clientOrderDetailAliquot.AsXML();
                clientOrderDetailElement.Add(clientOrderDetailAliquotElement);
            }
            return(clientOrderDetailElement);
        }
Example #5
0
        public virtual XElement ToXML(bool includeChildren)
        {
            XElement clientOrderElement = new XElement("ClientOrder");

            YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(this, clientOrderElement);
            clientOrderPropertyWriter.Write();

            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in this.ClientOrderDetailCollection)
            {
                XElement clientOrderDetailElement = clientOrderDetail.AsXML();
                clientOrderElement.Add(clientOrderDetailElement);
            }

            return(clientOrderElement);
        }
Example #6
0
		public static YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData GetPlacentalPathologyQuestionnaire(string clientOrderId, object writer)
		{
            YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullClientOrderByClientOrderId(clientOrderId, writer);
			XElement clientOrderElement = new XElement("ClientOrder");
			YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(clientOrder, clientOrderElement);
			clientOrderPropertyWriter.Write();

			foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection)
			{
				if (clientOrderDetail.OrderTypeCode == "PLCNT")
				{
					XElement clientOrderDetailElement = new XElement("ClientOrderDetail");
					YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement);
					clientOrderDetailPropertyWriter.Write();
					clientOrderElement.Add(clientOrderDetailElement);
				}
			}
			YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData result = new YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData(clientOrderElement);
			return result;
		}
Example #7
0
		public static XElement GetClientOrders(string masterAccessionNo)
		{			
			XElement result = new XElement("ClientOrders");
            YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersByMasterAccessionNo(masterAccessionNo);
            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder in clientOrderCollection)
            {
                XElement clientOrderElement = new XElement("ClientOrder");
                YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(clientOrder, clientOrderElement);
                clientOrderPropertyWriter.Write();
                result.Add(clientOrderElement);
                
                foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection)
                {
                    XElement clientOrderDetailElement = new XElement("ClientOrderDetail");
                    YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement);
                    clientOrderDetailPropertyWriter.Write();
                    clientOrderElement.Add(clientOrderDetailElement);
                }
            }            
			return result;
		}
Example #8
0
        public virtual XElement ToXML(bool includeChildren)
        {
            XElement clientOrderElement = new XElement("ClientOrder");
            YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(this, clientOrderElement);
            clientOrderPropertyWriter.Write();

            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in this.ClientOrderDetailCollection)
            {
                XElement clientOrderDetailElement = clientOrderDetail.AsXML();
                clientOrderElement.Add(clientOrderDetailElement);
            }

            return clientOrderElement;
        }
        public XElement AsXML()
        {
            XElement clientOrderDetailElement = new XElement("ClientOrderDetail");
            YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(this, clientOrderDetailElement);
            clientOrderDetailPropertyWriter.Write();

            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetailAliquot clientOrderDetailAliquot in this.ClientOrderDetailAliquotCollection)
            {
                XElement clientOrderDetailAliquotElement = clientOrderDetailAliquot.AsXML();
                clientOrderDetailElement.Add(clientOrderDetailAliquotElement);
            }
            return clientOrderDetailElement;
        }
 public XElement AsXML()
 {
     XElement clientOrderDetailAliquotElement = new XElement("ClientOrderDetailAliquot");
     YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailAliquotPropertyWriter = new Persistence.XmlPropertyReader(this, clientOrderDetailAliquotElement);
     clientOrderDetailAliquotPropertyWriter.Write();
     return clientOrderDetailAliquotElement;
 }
Example #11
0
        public static XElement GetClientOrders(string masterAccessionNo)
        {
            XElement result = new XElement("ClientOrders");
            YellowstonePathology.Business.ClientOrder.Model.ClientOrderCollection clientOrderCollection = YellowstonePathology.Business.Gateway.ClientOrderGateway.GetClientOrdersByMasterAccessionNo(masterAccessionNo);
            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder in clientOrderCollection)
            {
                XElement clientOrderElement = new XElement("ClientOrder");
                YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(clientOrder, clientOrderElement);
                clientOrderPropertyWriter.Write();
                result.Add(clientOrderElement);

                foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection)
                {
                    XElement clientOrderDetailElement = new XElement("ClientOrderDetail");
                    YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement);
                    clientOrderDetailPropertyWriter.Write();
                    clientOrderElement.Add(clientOrderDetailElement);
                }
            }
            return result;
        }
Example #12
0
        public static XElement GetSpecimenOrder(string masterAccessionNo)
        {
            XElement result = new XElement("SpecimenOrders");

            SqlCommand cmd = new SqlCommand();
            cmd.CommandText = "Select * from tblSpecimenOrder where MasterAccessionno = '" + masterAccessionNo + "' order by SpecimenNumber";
            cmd.CommandType = CommandType.Text;

            using (SqlConnection cn = new SqlConnection(YellowstonePathology.Business.Properties.Settings.Default.CurrentConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = new Specimen.Model.SpecimenOrder();
                        XElement specimenOrderElement = new XElement("SpecimenOrder");
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(specimenOrder, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();

                        YellowstonePathology.Business.Persistence.XmlPropertyReader xmlPropertyReader = new Persistence.XmlPropertyReader(specimenOrder, specimenOrderElement);
                        xmlPropertyReader.Write();
                        result.Add(specimenOrderElement);
                    }
                }
            }

            return result;
        }
Example #13
0
        public static YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData GetPlacentalPathologyQuestionnaire(string clientOrderId, object writer)
        {
            YellowstonePathology.Business.ClientOrder.Model.ClientOrder clientOrder = YellowstonePathology.Business.Persistence.DocumentGateway.Instance.PullClientOrderByClientOrderId(clientOrderId, writer);
            XElement clientOrderElement = new XElement("ClientOrder");
            YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderPropertyWriter = new Persistence.XmlPropertyReader(clientOrder, clientOrderElement);
            clientOrderPropertyWriter.Write();

            foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection)
            {
                if (clientOrderDetail.OrderTypeCode == "PLCNT")
                {
                    XElement clientOrderDetailElement = new XElement("ClientOrderDetail");
                    YellowstonePathology.Business.Persistence.XmlPropertyReader clientOrderDetailPropertyWriter = new Persistence.XmlPropertyReader(clientOrderDetail, clientOrderDetailElement);
                    clientOrderDetailPropertyWriter.Write();
                    clientOrderElement.Add(clientOrderDetailElement);
                }
            }
            YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData result = new YellowstonePathology.Document.Result.Data.PlacentalPathologyQuestionnaireData(clientOrderElement);
            return result;
        }