public void Add(int testId, YellowstonePathology.Business.Billing.CptBillingCodeItem cptBillingCodeItem)
 {
     YellowstonePathology.Business.Test.Model.StainTest stainTest = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetStainTestByTestId(testId);
     if (stainTest != null)
     {
         cptBillingCodeItem.CptCode  = stainTest.CptCode;
         cptBillingCodeItem.Quantity = stainTest.CptCodeQuantity;
         this.Add(cptBillingCodeItem);
     }
 }
Пример #2
0
        private void AddStainResult(YellowstonePathology.Business.Test.Model.Test test)
        {
            YellowstonePathology.Business.Test.Model.StainTest stainTest = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetStainTestByTestId(test.TestId);
            if (stainTest != null && !string.IsNullOrEmpty(stainTest.CptCode))
            {
                YellowstonePathology.Business.SpecialStain.StainResultItem stainResultItem = this.m_SurgicalSpecimen.StainResultItemCollection.GetNextItem(this.m_SurgicalSpecimen.SurgicalSpecimenId);
                stainResultItem.TestOrderId     = this.m_TestOrder.TestOrderId;
                stainResultItem.ProcedureName   = test.TestName;
                stainResultItem.CptCode         = stainTest.CptCode;
                stainResultItem.CptCodeQuantity = stainTest.CptCodeQuantity;
                stainResultItem.ControlComment  = stainTest.ControlComment;
                stainResultItem.StainType       = stainTest.StainType;
                stainResultItem.Billable        = true;
                stainResultItem.Reportable      = true;

                if (stainTest.ImmunoCommentId > 0)
                {
                    YellowstonePathology.Business.Domain.ImmunoComment immunoComment = Business.Gateway.AccessionOrderGateway.GetImmunoCommentByImmunocommentId(stainTest.ImmunoCommentId);
                    stainResultItem.ImmunoComment = immunoComment.Comment;
                }
                this.m_SurgicalSpecimen.StainResultItemCollection.Add(stainResultItem);
            }
        }
Пример #3
0
        public static YellowstonePathology.Business.Test.Model.StainTest GetStainTestByTestId(int testId)
        {
            YellowstonePathology.Business.Test.Model.StainTest result = null;
            SqlCommand cmd = new SqlCommand("SELECT * from tblStainTest where TestId = @TestId");
            cmd.CommandType = System.Data.CommandType.Text;
            cmd.Parameters.Add("@TestId", SqlDbType.Int).Value = testId;

            using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.ProductionConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        result = new YellowstonePathology.Business.Test.Model.StainTest();
                        YellowstonePathology.Business.Persistence.SqlDataReaderPropertyWriter sqlDataReaderPropertyWriter = new Persistence.SqlDataReaderPropertyWriter(result, dr);
                        sqlDataReaderPropertyWriter.WriteProperties();
                    }
                }
            }
            return result;
        }