public AccessionOrderDataSheetDataV2(Test.AccessionOrder accessionOrder, ClientOrder.Model.ClientOrderCollection clientOrderCollection, Domain.OrderCommentLogCollection orderCommentLogCollection)
        {
            this.m_AccessionOrderDataSheetDataAccessionOrder = new AccessionOrderDataSheetDataAccessionOrder(accessionOrder, clientOrderCollection);
            this.m_AccessionOrderDataSheetDataClientOrders = new List<AccessionOrderDataSheetDataClientOrder>();
            this.m_AccessionOrderDataSheetDataSpecimenOrders = new List<AccessionOrderDataSheetDataSpecimenOrder>();
            this.m_AccessionOrderDataSheetDataCommentLogs = new List<AccessionOrderDataSheetDataCommentLog>();

            foreach (Business.ClientOrder.Model.ClientOrder clientOrder in clientOrderCollection)
            {
                AccessionOrderDataSheetDataClientOrder accessionOrderDataSheetDataClientOrder = new AccessionOrderDataSheetDataClientOrder(clientOrder);
                this.m_AccessionOrderDataSheetDataClientOrders.Add(accessionOrderDataSheetDataClientOrder);
            }

            foreach (Specimen.Model.SpecimenOrder specimenOrder in accessionOrder.SpecimenOrderCollection)
            {
                AccessionOrderDataSheetDataSpecimenOrder accessionOrderDataSheetDataSpecimenOrder = new AccessionOrderDataSheetDataSpecimenOrder(specimenOrder, clientOrderCollection);
                this.m_AccessionOrderDataSheetDataSpecimenOrders.Add(accessionOrderDataSheetDataSpecimenOrder);
            }

            foreach (Domain.OrderCommentLog orderCommentLog in orderCommentLogCollection)
            {
                AccessionOrderDataSheetDataCommentLog accessionOrderDataSheetDataCommentLog = new AccessionOrderDataSheetDataCommentLog(orderCommentLog);
                this.m_AccessionOrderDataSheetDataCommentLogs.Add(accessionOrderDataSheetDataCommentLog);
            }
        }
 public AccessionOrderDataSheetDataClientOrder(ClientOrder.Model.ClientOrder clientOrder)
 {
     this.m_ClientName = clientOrder.ClientName;
     this.m_OrderedBy = clientOrder.OrderedBy;
     this.m_OrderDate = clientOrder.OrderDate.Value.ToShortDateString();
     this.m_Submitted = clientOrder.Submitted.ToString();
     this.m_Accessioned = clientOrder.Accessioned.ToString();
     this.m_SystemInitiatingOrder = string.IsNullOrEmpty(clientOrder.SystemInitiatingOrder) == false ? clientOrder.SystemInitiatingOrder : string.Empty;
 }
        public AccessionOrderDataSheetDataAccessionOrder(Test.AccessionOrder accessionOrder, ClientOrder.Model.ClientOrderCollection clientOrderCollection)
        {
            this.m_PatientDisplayName = string.Empty;
            this.m_SSN = string.Empty;
            this.m_ClientName = string.Empty;
            this.m_PhysicianName = string.Empty;
            this.m_MasterAccessionNo = string.Empty;
            this.m_AccessionTime = string.Empty;
            this.m_SvhMedicalRecord = string.Empty;
            this.m_SvhAccount = string.Empty;
            this.m_ClinicalHistory = string.Empty;
            this.m_PreOpDiagnosis = string.Empty;
            this.m_SpecialInstructions = string.Empty;

            this.SetPatientDisplayName(accessionOrder);
            this.SetAccessionData(accessionOrder);
            this.SetClientOrderData(clientOrderCollection);
        }
 public PlacentalPathologyQuestionnaireDataV2(ClientOrder.Model.ClientOrder clientOrder)
 {
     SetClientOrderValues(clientOrder);
     SetPlacentaDetailValues(clientOrder);
 }
        private void SetPlacentaDetailValues(ClientOrder.Model.ClientOrder clientOrder)
        {
            ClientOrder.Model.PlacentaClientOrderDetail placentaClientOrderDetail = this.GetPlacentaClientOrderDetail(clientOrder);

            this.m_DateSubmitted = placentaClientOrderDetail.DateSubmitted.HasValue ? placentaClientOrderDetail.DateSubmitted.Value.ToString(this.m_DateFormat) : string.Empty;
            this.m_Birthdate = string.IsNullOrEmpty(placentaClientOrderDetail.Birthdate) == false ? placentaClientOrderDetail.Birthdate : string.Empty;
            this.m_BirthTime = string.IsNullOrEmpty(placentaClientOrderDetail.BirthTime) == false ? placentaClientOrderDetail.BirthTime : string.Empty;
            this.m_PlacentaDeliveryTime = string.IsNullOrEmpty(placentaClientOrderDetail.PlacentaDeliveryTime) == false ? placentaClientOrderDetail.PlacentaDeliveryTime : string.Empty;
            this.m_GestationalAge = string.IsNullOrEmpty(placentaClientOrderDetail.GestationalAge) == false ? placentaClientOrderDetail.GestationalAge : string.Empty;
            this.m_Gravida = string.IsNullOrEmpty(placentaClientOrderDetail.Gravida) == false ? placentaClientOrderDetail.Gravida : string.Empty;
            this.m_Para = string.IsNullOrEmpty(placentaClientOrderDetail.Para) == false ? placentaClientOrderDetail.Para : string.Empty;
            this.m_Apgar1Min = string.IsNullOrEmpty(placentaClientOrderDetail.Apgar1Min) == false ? placentaClientOrderDetail.Apgar1Min : string.Empty;
            this.m_Apgar5Min = string.IsNullOrEmpty(placentaClientOrderDetail.Apgar5Min) == false ? placentaClientOrderDetail.Apgar5Min : string.Empty;
            this.m_Apgar10Min = string.IsNullOrEmpty(placentaClientOrderDetail.Apgar10Min) == false ? placentaClientOrderDetail.Apgar10Min : string.Empty;
            this.m_InfantWeight = string.IsNullOrEmpty(placentaClientOrderDetail.InfantWeight) == false ? placentaClientOrderDetail.InfantWeight : string.Empty;
            this.m_SpecificQuestions = string.IsNullOrEmpty(placentaClientOrderDetail.SpecificQuestions) == false ? placentaClientOrderDetail.SpecificQuestions : string.Empty;
            this.m_OtherExam = string.IsNullOrEmpty(placentaClientOrderDetail.OtherExam) == false ? placentaClientOrderDetail.OtherExam : string.Empty;
            this.m_Other1 = string.IsNullOrEmpty(placentaClientOrderDetail.Other1) == false ? placentaClientOrderDetail.Other1 : string.Empty;
            this.m_Other2 = string.IsNullOrEmpty(placentaClientOrderDetail.Other2) == false ? placentaClientOrderDetail.Other2 : string.Empty;
            this.m_Other3 = string.IsNullOrEmpty(placentaClientOrderDetail.Other3) == false ? placentaClientOrderDetail.Other3 : string.Empty;
            this.m_SubmittedBy = string.IsNullOrEmpty(placentaClientOrderDetail.SubmittedBy) == false ? placentaClientOrderDetail.SubmittedBy : string.Empty;

            this.m_Abortion = placentaClientOrderDetail.Abortion;
            this.m_GrossExam = placentaClientOrderDetail.GrossExam;
            this.m_CompleteExam = placentaClientOrderDetail.CompleteExam;
            this.m_Cytogenetics = placentaClientOrderDetail.Cytogenetics;
            this.m_DiabetesMellitus = placentaClientOrderDetail.DiabetesMellitus;
            this.m_PregnancyInducedHypertension = placentaClientOrderDetail.PregnancyInducedHypertension;
            this.m_UnexplainedFever = placentaClientOrderDetail.UnexplainedFever;
            this.m_PrematureRuptureOfMembranes = placentaClientOrderDetail.PrematureRuptureOfMembranes;
            this.m_PoorOrLimitedPrenatalCare = placentaClientOrderDetail.PoorOrLimitedPrenatalCare;
            this.m_Polyhydramnios = placentaClientOrderDetail.Polyhydramnios;
            this.m_Oligohydramnios = placentaClientOrderDetail.Oligohydramnios;
            this.m_PretermDeliveryLessThan36Weeks = placentaClientOrderDetail.PretermDeliveryLessThan36Weeks;
            this.m_PostTermDeliveryMoreThan42Weeks = placentaClientOrderDetail.PostTermDeliveryMoreThan42Weeks;
            this.m_Infection = placentaClientOrderDetail.Infection;
            this.m_PostpartumHemorrhage = placentaClientOrderDetail.PostpartumHemorrhage;
            this.m_MaternalHistoryOfReproductiveFailure = placentaClientOrderDetail.MaternalHistoryOfReproductiveFailure;
            this.m_SeverePreeclampsia = placentaClientOrderDetail.SeverePreeclampsia;
            this.m_SuspectedDrugUse = placentaClientOrderDetail.SuspectedDrugUse;
            this.m_SuspectedInfection = placentaClientOrderDetail.SuspectedInfection;
            this.m_Stillborn = placentaClientOrderDetail.Stillborn;
            this.m_ErythroblastosisFetalis = placentaClientOrderDetail.ErythroblastosisFetalis;
            this.m_NeonatalDeath = placentaClientOrderDetail.NeonatalDeath;
            this.m_TransferToNICU = placentaClientOrderDetail.TransferToNICU;
            this.m_ViscidOrThickMeconium = placentaClientOrderDetail.ViscidOrThickMeconium;
            this.m_MultipleGestation = placentaClientOrderDetail.MultipleGestation;
            this.m_OminousFHRTracing = placentaClientOrderDetail.OminousFHRTracing;
            this.m_Prematurity = placentaClientOrderDetail.Prematurity;
            this.m_IUGR = placentaClientOrderDetail.IUGR;
            this.m_ApgarLessThan7at5Min = placentaClientOrderDetail.ApgarLessThan7at5Min;
            this.m_CordpHLessThan7dot10 = placentaClientOrderDetail.CordpHLessThan7dot10;
            this.m_CongenitalAnomalies = placentaClientOrderDetail.CongenitalAnomalies;
            this.m_NeonatalSeizures = placentaClientOrderDetail.NeonatalSeizures;
            this.m_Infarcts = placentaClientOrderDetail.Infarcts;
            this.m_AbnormalCalcifications = placentaClientOrderDetail.AbnormalCalcifications;
            this.m_Abruption = placentaClientOrderDetail.Abruption;
            this.m_PlacentaPrevia = placentaClientOrderDetail.PlacentaPrevia;
            this.m_VasaPrevia = placentaClientOrderDetail.VasaPrevia;
            this.m_AbnormalCordAppearance = placentaClientOrderDetail.AbnormalCordAppearance;
            this.m_Mass = placentaClientOrderDetail.Mass;
        }
 private void SetClientOrderValues(ClientOrder.Model.ClientOrder clientOrder)
 {
     this.m_PFirstName = clientOrder.PFirstName;
     this.m_PLastName = clientOrder.PLastName;
 }
 private ClientOrder.Model.PlacentaClientOrderDetail GetPlacentaClientOrderDetail(ClientOrder.Model.ClientOrder clientOrder)
 {
     ClientOrder.Model.PlacentaClientOrderDetail result = null;
     foreach (YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail clientOrderDetail in clientOrder.ClientOrderDetailCollection)
     {
         if (clientOrderDetail.OrderTypeCode == "PLCNT")
         {
             result = (ClientOrder.Model.PlacentaClientOrderDetail)clientOrderDetail;
             break;
         }
     }
     return result;
 }
        private void SetClientOrderData(ClientOrder.Model.ClientOrderCollection clientOrderCollection)
        {
            string clinicalHistory = string.Empty;
            string preOpDiagnosis = string.Empty;
            string coSpecialInstructions = string.Empty;

            foreach (Business.ClientOrder.Model.ClientOrder clientOrder in clientOrderCollection)
            {
                string clientClinicalHistory = clientOrder.ClinicalHistory;

                string clientPreOpDiagnosis = string.Empty;
                if (clientOrder.PanelSetId == 13)
                {
                    ClientOrder.Model.SurgicalClientOrder surgicalClientOrder = (ClientOrder.Model.SurgicalClientOrder)clientOrder;
                    if (string.IsNullOrEmpty(surgicalClientOrder.PreOpDiagnosis) == false) clientPreOpDiagnosis = surgicalClientOrder.PreOpDiagnosis;
                }

                if (string.IsNullOrEmpty(clinicalHistory) == true)
                {
                    if (string.IsNullOrEmpty(clientClinicalHistory) == false)
                    {
                        clinicalHistory = clientClinicalHistory;
                    }
                }

                if (string.IsNullOrEmpty(preOpDiagnosis) == true)
                {
                    if (string.IsNullOrEmpty(clientPreOpDiagnosis) == false)
                    {
                        preOpDiagnosis = clientPreOpDiagnosis;
                    }
                }

                if (string.IsNullOrEmpty(clientOrder.SpecialInstructions) == false) coSpecialInstructions += clientOrder.SpecialInstructions;
            }

            this.m_ClinicalHistory = clinicalHistory;
            this.m_PreOpDiagnosis = preOpDiagnosis;
            this.m_SpecialInstructions = coSpecialInstructions;
        }
        public AccessionOrderDataSheetDataSpecimenOrder(Specimen.Model.SpecimenOrder specimenOrder, ClientOrder.Model.ClientOrderCollection clientOrderCollection)
        {
            string specimenNumber = specimenOrder.SpecimenNumber.ToString();
            string specimenDescription = specimenOrder.Description;
            this.m_Description = specimenNumber + ". " + specimenDescription;

            this.m_CollectionTime = string.Empty;
            if (specimenOrder.CollectionDate.HasValue == true)
            {
                YellowstonePathology.Business.Helper.DateTimeJoiner dateTimeJoiner = new Business.Helper.DateTimeJoiner(specimenOrder.CollectionDate.Value, specimenOrder.CollectionTime);
                this.m_CollectionTime = dateTimeJoiner.DisplayString;
            }
            else if (specimenOrder.CollectionTime.HasValue == true)
            {
                YellowstonePathology.Business.Helper.DateTimeJoiner dateTimeJoiner = new Business.Helper.DateTimeJoiner(specimenOrder.CollectionTime.Value, specimenOrder.CollectionTime);
                this.m_CollectionTime = dateTimeJoiner.DisplayString;
            }

            this.m_ReceivedIn = string.IsNullOrEmpty(specimenOrder.ClientFixation) == false ? specimenOrder.ClientFixation : string.Empty;
            this.m_ProcessedIn = string.IsNullOrEmpty(specimenOrder.LabFixation) == false ? specimenOrder.LabFixation : string.Empty;
            this.m_AccessionTime = specimenOrder.AccessionTime.HasValue ? specimenOrder.AccessionTime.Value.ToShortDateString() + " " + specimenOrder.AccessionTime.Value.ToShortTimeString() : string.Empty;
            this.m_Verified = specimenOrder.Verified.ToString();
            this.m_VerifiedById = specimenOrder.VerifiedById.ToString();
            this.m_VerifiedDate = specimenOrder.VerifiedDate.HasValue ? specimenOrder.VerifiedDate.Value.ToShortDateString() + " " + specimenOrder.VerifiedDate.Value.ToShortTimeString() : string.Empty;

            List<ClientOrder.Model.ClientOrderDetail> clientOrderDetails = (from co in clientOrderCollection
                                                                            from cod in co.ClientOrderDetailCollection
                                                                            where cod.ContainerId == specimenOrder.ContainerId
                                                                            select cod).ToList<ClientOrder.Model.ClientOrderDetail>();
            if (clientOrderDetails.Count > 0)
            {
                ClientOrder.Model.ClientOrderDetail clientOrderDetail = clientOrderDetails[0];
                string clientSpecimenNumber = clientOrderDetail.SpecimenNumber.ToString();
                string clientDescription = clientOrderDetail.Description;
                this.m_ClientDescription = clientSpecimenNumber + ". " + clientDescription;

                this.m_AccessionedAsDescription = clientOrderDetail.DescriptionToAccession;
                this.m_AccessionedAsNumberedDescription = clientSpecimenNumber + ". " + this.m_AccessionedAsDescription;
                this.m_SpecialInstructions = string.IsNullOrEmpty(clientOrderDetail.SpecialInstructions) == false ? clientOrderDetail.SpecialInstructions : string.Empty;

                //this.m_SpecialInstructions = clientOrderDetail.OrderType;
                this.m_OrderType = string.IsNullOrEmpty(clientOrderDetail.OrderType) == false ? clientOrderDetail.OrderType : string.Empty;
                this.m_CallbackNumber = string.IsNullOrEmpty(clientOrderDetail.CallbackNumber) == false ? clientOrderDetail.CallbackNumber : string.Empty;

                if (clientOrderDetail.CollectionDate.HasValue)
                {
                    this.m_CollectionDate = clientOrderDetail.CollectionDate.HasValue ? clientOrderDetail.CollectionDate.Value.ToShortDateString() + " " + clientOrderDetail.CollectionDate.Value.ToShortTimeString() : string.Empty;
                }

                this.m_SpecimenNumberMatchStatus = string.IsNullOrEmpty(clientOrderDetail.SpecimenNumberMatchStatus) == false ? clientOrderDetail.SpecimenNumberMatchStatus : string.Empty;
                this.m_SpecimenDescriptionMatchStatus = string.IsNullOrEmpty(clientOrderDetail.SpecimenDescriptionMatchStatus) == false ? clientOrderDetail.SpecimenDescriptionMatchStatus : string.Empty;
                this.m_OrderedBy = clientOrderDetail.OrderedBy;
                this.m_OrderTime = clientOrderDetail.OrderTime.HasValue ? clientOrderDetail.OrderTime.Value.ToShortDateString() + " " + clientOrderDetail.OrderTime.Value.ToShortTimeString() : string.Empty;
                this.m_Accessioned = clientOrderDetail.Accessioned.ToString();
            }
            else
            {
                this.m_Description = "None";
                this.m_AccessionedAsDescription = string.Empty;
                this.m_AccessionedAsNumberedDescription = string.Empty;
                this.m_SpecialInstructions = string.Empty;
                this.m_OrderType = string.Empty;
                this.m_CallbackNumber = string.Empty;
                this.m_CollectionDate = string.Empty;
                this.m_SpecimenNumberMatchStatus = string.Empty;
                this.m_SpecimenDescriptionMatchStatus = string.Empty;
                this.m_OrderedBy = string.Empty;
                this.m_OrderTime = string.Empty;
                this.m_Accessioned = string.Empty;
            }
        }