public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { Business.HL7View.ECW.ECWResultView ecwResultView = new HL7View.ECW.ECWResultView(reportNo, accessionOrder, false); YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); ecwResultView.CanSend(result); return result; }
public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); YellowstonePathology.Business.HL7View.CDC.MTDohResultView mtDohResultView = new HL7View.CDC.MTDohResultView(reportNo, accessionOrder); mtDohResultView.CanSend(result); return(result); }
protected string BuildMethod(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { string result = string.Empty; Rules.MethodResult brafResult = this.HasFinalBRAFResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); Rules.MethodResult methResult = this.HasFinalMethResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (brafResult.Success == true && methResult.Success == true) { result = IHCBRAFMLHMethod; } else if (brafResult.Success == true && methResult.Success == false) { result = IHCBRAFMethod; } else if (brafResult.Success == false && methResult.Success == true) { result = IHCMLHMethod; } else { result = IHCMethod; } return(result); }
public static YellowstonePathology.Business.Rules.MethodResult AddDailyTaskOrderRetrospectiveReviews(object writer) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); //DateTime actionDate = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetNewestDailyTaskOrderTaskDate(task.TaskId); DateTime actionDate = DateTime.Today; YellowstonePathology.Business.User.SystemIdentity systemIdentity = Business.User.SystemIdentity.Instance; DateTime finalDate = DateTime.Parse("12/31/2018"); while (actionDate < finalDate) { if (actionDate.DayOfWeek != DayOfWeek.Saturday && actionDate.DayOfWeek != DayOfWeek.Sunday) { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Task.Model.TaskOrderRetrospectiveReview taskOrder = new YellowstonePathology.Business.Task.Model.TaskOrderRetrospectiveReview(objectId, actionDate, objectId, systemIdentity); Persistence.DocumentGateway.Instance.InsertDocument(taskOrder, writer); } actionDate = actionDate.AddDays(1); } Persistence.DocumentGateway.Instance.Clear(writer); actionDate = actionDate.AddDays(-1); result.Message = "Daily Task Order Retrospective Reviews have been added through " + actionDate.ToString("MM/dd/yyyy"); return(result); }
public static YellowstonePathology.Business.Rules.MethodResult AddDailyTaskOrderPOCReport(int weeks) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); YellowstonePathology.Business.Task.Model.TaskPOCReport task = new TaskPOCReport(); DateTime actionDate = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetNewestWeeklyTaskOrderTaskDate(task.TaskId); YellowstonePathology.Business.Task.Model.TaskOrderCollection taskOrderCollection = new YellowstonePathology.Business.Task.Model.TaskOrderCollection(); YellowstonePathology.Business.User.SystemIdentity systemIdentity = Business.User.SystemIdentity.Instance; DateTime finalDate = actionDate.AddDays(weeks * 7); while (actionDate < finalDate) { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Task.Model.TaskOrderPOCReport taskOrder = new YellowstonePathology.Business.Task.Model.TaskOrderPOCReport(objectId, actionDate, objectId, systemIdentity); taskOrderCollection.Add(taskOrder); actionDate = actionDate.AddDays(7); } actionDate = actionDate.AddDays(-7); result.Message = "Daily Task Order POC Report have been added through " + actionDate.ToString("MM/dd/yyyy"); return(result); }
public YellowstonePathology.Business.Rules.MethodResult DistributeHL7(string reportNo, Business.Test.AccessionOrder accessionOrder) { Business.HL7View.WPH.WPHResultView resultView = new HL7View.WPH.WPHResultView(reportNo, accessionOrder, false); YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); resultView.Send(result); return(result); }
public YellowstonePathology.Business.Rules.MethodResult Post() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.m_PanelSetOrder.HoldBilling == false) { this.PostPQRICodes(); BillingComponent billingComponent = BillingComponent.GetBillingComponent(this.m_PanelSetOrder); billingComponent.Post(this); this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.SetPostDate(DateTime.Today); if (this.IsOkToSetPostDate() == true) { this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.SetPostDate(DateTime.Today); } this.m_PanelSetOrder.IsPosted = true; methodResult.Success = true; } else { methodResult.Success = false; methodResult.Message = "This case cannot be posted because it is on hold."; } return(methodResult); }
public override AuditResult IsOkToSetResults(AccessionOrder accessionOrder, PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { AuditResult result = base.IsOkToSetResults(accessionOrder, panelSetOrderLynchSyndromeEvaluation); Rules.MethodResult brafResult = null; if (result.Status == Audit.Model.AuditStatusEnum.OK) { brafResult = this.HasFinalBRAFResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (brafResult.Success == false) { result.Status = AuditStatusEnum.Failure; result.Message = brafResult.Message; } } if (result.Status == Audit.Model.AuditStatusEnum.OK) { if (brafResult.Message == TestResult.NotDetected) { Rules.MethodResult methResult = this.HasFinalMethResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (methResult.Success == false) { result.Status = AuditStatusEnum.Failure; result.Message = methResult.Message; } } } return(result); }
public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); result.Message = "Nothing to distribute on WebService"; result.Success = true; return result; }
protected Rules.MethodResult HasFinalMethResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { Rules.MethodResult result = new Rules.MethodResult(); YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest panelSetMLH1 = new YellowstonePathology.Business.Test.LynchSyndrome.MLH1MethylationAnalysisTest(); if (accessionOrder.PanelSetOrderCollection.Exists(panelSetMLH1.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true) == true) { YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis panelSetOrderMLH1MethylationAnalysis = (YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderMLH1MethylationAnalysis)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(panelSetMLH1.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true); if (panelSetOrderMLH1MethylationAnalysis.Final == true) { result.Success = true; result.Message = panelSetOrderMLH1MethylationAnalysis.GetSummaryResult(); } else { result.Success = false; result.Message = "Unable to set results as the " + panelSetMLH1.PanelSetName + " is not final."; } } else { result.Success = false; result.Message = "Unable to set results as a " + panelSetMLH1.PanelSetName + " has not been ordered."; } return(result); }
public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.HL7View.CMMC.CMMCResultView cmmcResultView = new HL7View.CMMC.CMMCResultView(reportNo, accessionOrder); YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); cmmcResultView.Send(result); return result; }
public static YellowstonePathology.Business.Rules.MethodResult AddDailyTaskOrderCytologySlideDisposal(int days) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); YellowstonePathology.Business.Task.Model.TaskCytologySlideDisposal task = new TaskCytologySlideDisposal(); DateTime actionDate = YellowstonePathology.Business.Gateway.AccessionOrderGateway.GetNewestDailyTaskOrderTaskDate(task.TaskId); YellowstonePathology.Business.Task.Model.TaskOrderCollection taskOrderCollection = new YellowstonePathology.Business.Task.Model.TaskOrderCollection(); YellowstonePathology.Business.User.SystemIdentity systemIdentity = Business.User.SystemIdentity.Instance; DateTime finalDate = actionDate.AddDays(days); while (actionDate < finalDate) { string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Task.Model.TaskOrderCytologySlideDisposal taskOrder = new YellowstonePathology.Business.Task.Model.TaskOrderCytologySlideDisposal(objectId, actionDate, objectId, systemIdentity); taskOrderCollection.Add(taskOrder); actionDate = actionDate.AddDays(1); } //YellowstonePathology.Business.Persistence.DocumentGateway.Instance.SubmitChanges(taskOrderCollection, false); actionDate = actionDate.AddDays(-1); result.Message = "Daily Task Order Cytology Slide Disposal have been added through " + actionDate.ToString("MM/dd/yyyy"); return(result); }
public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); result.Message = "Nothing to distribute on WebService"; result.Success = true; return(result); }
public YellowstonePathology.Business.Rules.MethodResult IsOkToMedTechFinal() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.PanelSetOrderLeukemiaLymphoma.OrderedOn, this.PanelSetOrderLeukemiaLymphoma.OrderedOnId); if (specimenOrder == null) { methodResult.Success = false; methodResult.Message = "The specimen for this case has not been selected."; } else { if (string.IsNullOrEmpty(specimenOrder.SpecimenAdequacy) == true) { methodResult.Success = false; methodResult.Message = "The specimen adequacy for the specimen is not set."; } } if (methodResult.Success == true) { if (string.IsNullOrEmpty(this.m_PanelSetOrderLeukemiaLymphoma.SpecimenViabilityPercent) == true) { methodResult.Success = false; methodResult.Message += Environment.NewLine + "The specimen viability is not set."; } } return(methodResult); }
public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { Business.HL7View.ECW.ECWResultView ecwResultView = new HL7View.ECW.ECWResultView(reportNo, accessionOrder, false); YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); ecwResultView.CanSend(result); return(result); }
public static YellowstonePathology.Business.Rules.MethodResult IsValidJSONString(string stringToValidate) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); result.Success = true; string jString = stringToValidate.Trim(); if ((jString.StartsWith("{") && jString.EndsWith("}")) || //For object (jString.StartsWith("[") && jString.EndsWith("]"))) //For array { try { var obj = JToken.Parse(jString); } catch (JsonReaderException jex) { result.Message = jex.Message; result.Success = false; } catch (Exception ex) { result.Message = ex.ToString(); result.Success = false; } } else { result.Message = "The JSON string does not start and end wiith '[' and']' or '{' and'}'."; result.Success = false; } return(result); }
protected Rules.MethodResult HasFinalBRAFResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { Rules.MethodResult result = new Rules.MethodResult(); result.Success = false; YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTest brafV600EKTest = new YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTest(); YellowstonePathology.Business.Test.BRAFMutationAnalysis.BRAFMutationAnalysisTest brafMutationAnalysisTest = new BRAFMutationAnalysis.BRAFMutationAnalysisTest(); YellowstonePathology.Business.Test.RASRAFPanel.RASRAFPanelTest rasRAFPanelTest = new YellowstonePathology.Business.Test.RASRAFPanel.RASRAFPanelTest(); if (accessionOrder.PanelSetOrderCollection.Exists(brafV600EKTest.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true) == true) { YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTestOrder panelSetOrderBraf = (YellowstonePathology.Business.Test.BRAFV600EK.BRAFV600EKTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(brafV600EKTest.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true); if (panelSetOrderBraf.Final == true) { result.Success = true; result.Message = panelSetOrderBraf.GetSummaryResult(); } else { result.Success = false; result.Message = "Unable to set results as the " + brafV600EKTest.PanelSetName + " is not final."; } } else if (accessionOrder.PanelSetOrderCollection.Exists(brafMutationAnalysisTest.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true) == true) { YellowstonePathology.Business.Test.BRAFMutationAnalysis.BRAFMutationAnalysisTestOrder brafMutationAnalysisTestOrder = (YellowstonePathology.Business.Test.BRAFMutationAnalysis.BRAFMutationAnalysisTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(brafMutationAnalysisTest.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true); if (brafMutationAnalysisTestOrder.Final == true) { result.Success = true; result.Message = brafMutationAnalysisTestOrder.GetSummaryResult(); } else { result.Success = false; result.Message = "Unable to set results as the " + brafMutationAnalysisTest.PanelSetName + " is not final."; } } else if (accessionOrder.PanelSetOrderCollection.Exists(rasRAFPanelTest.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true) == true) { YellowstonePathology.Business.Test.RASRAFPanel.RASRAFPanelTestOrder panelSetOrderRASRAF = (YellowstonePathology.Business.Test.RASRAFPanel.RASRAFPanelTestOrder)accessionOrder.PanelSetOrderCollection.GetPanelSetOrder(rasRAFPanelTest.PanelSetId, panelSetOrderLynchSyndromeEvaluation.OrderedOnId, true); if (panelSetOrderRASRAF.Final == true) { result.Success = true; result.Message = panelSetOrderRASRAF.GetBrafSummaryResult(); } else { result.Success = false; result.Message = "Unable to set results as the " + rasRAFPanelTest.PanelSetName + " is not final."; } } if (result.Success == false && string.IsNullOrEmpty(result.Message) == true) { result.Message = "Unable to set results as a BRAF has not been ordered."; } return(result); }
public Rules.MethodResult IsOkToAccept() { Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.Accepted == true) { methodResult.Success = false; methodResult.Message = "Result has already been accepted."; } return(methodResult); }
public override YellowstonePathology.Business.Rules.MethodResult IsOkToFinalize() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == true) { result.Success = false; result.Message = "This case cannot be finalized because it is already finalized."; } return(result); }
public YellowstonePathology.Business.Rules.MethodResult IsOkToUnfinalize() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.m_Final == false) { methodResult.Success = false; methodResult.Message = "Unable to unfinalize the Intraoperative Consultation as it is not finaled."; } return(methodResult); }
public override bool BRAFIsRequired(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { bool result = false; Rules.MethodResult methodResult = this.HasFinalBRAFResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (methodResult.Success == false && methodResult.Message.Contains("has not been ordered") == true) { result = true; } return(result); }
public DistributionResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { DistributionResult result = new DistributionResult(); Business.HL7View.WPH.WPHResultView resultView = new HL7View.WPH.WPHResultView(reportNo, accessionOrder, false); YellowstonePathology.Business.Rules.MethodResult hl7Result = new Rules.MethodResult(); resultView.Send(hl7Result); result.IsComplete = hl7Result.Success; result.Message = hl7Result.Message; return(result); }
protected string BuildMethResult(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { string result = string.Empty; Rules.MethodResult methResult = this.HasFinalMethResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (methResult.Success == true) { result = Environment.NewLine + "MLH1 promoter methylation " + methResult.Message.ToUpper(); } return(result); }
private string BuildInterpretation(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { string result = LSEGYNMeth.Interpretation; Rules.MethodResult methResult = this.HasFinalMethResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (methResult.Message == TestResult.NotDetected) { result = LSEColonSendOut.Interpretation; } return(result); }
public override AuditResult IsOkToFinalize(AccessionOrder accessionOrder) { AuditResult result = new AuditResult(); result.Status = AuditStatusEnum.OK; Rules.MethodResult methodResult = base.IsOkToFinalize(); if (methodResult.Success == false) { result.Status = AuditStatusEnum.Failure; result.Message = methodResult.Message; } if (result.Status == AuditStatusEnum.OK) { if (this.m_CellsCounted == 0) { result.Status = AuditStatusEnum.Failure; result.Message = "Unable to final as Total Cells Counted is not set."; } } if (result.Status == AuditStatusEnum.OK) { if (this.m_Her2SignalsCounted == 0) { result.Status = AuditStatusEnum.Failure; result.Message = "Unable to final as HER2 Signals Counted is not set."; } } if (result.Status == AuditStatusEnum.OK) { if (this.m_Chr17SignalsCounted == 0) { result.Status = AuditStatusEnum.Failure; result.Message = "Unable to final as Chr17 Signals Counted is not set."; } } if (result.Status == AuditStatusEnum.OK) { HER2AnalysisSummary.HER2AnalysisSummaryTest test = new HER2AnalysisSummary.HER2AnalysisSummaryTest(); if (accessionOrder.PanelSetOrderCollection.Exists(test.PanelSetId, this.m_OrderedOnId, true) == false) { result.Status = AuditStatusEnum.Failure; result.Message = "Unable to finalize as a " + test.PanelSetName + " is required."; } } return(result); }
public YellowstonePathology.Business.Rules.MethodResult IsOkToMedTechFinal() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.PanelSetOrderLeukemiaLymphoma.OrderedOn, this.PanelSetOrderLeukemiaLymphoma.OrderedOnId); if (specimenOrder == null) { methodResult.Success = false; methodResult.Message = "The specimen for this case has not been selected."; } return(methodResult); }
public virtual Audit.Model.AuditResult IsOkToSetResults(YellowstonePathology.Business.Test.AccessionOrder accessionOrder, YellowstonePathology.Business.Test.LynchSyndrome.PanelSetOrderLynchSyndromeEvaluation panelSetOrderLynchSyndromeEvaluation) { Audit.Model.AuditResult result = panelSetOrderLynchSyndromeEvaluation.IsOkToSetResults(); if (result.Status == Audit.Model.AuditStatusEnum.OK) { Rules.MethodResult hasIHCResult = this.HasFinalIHCResult(accessionOrder, panelSetOrderLynchSyndromeEvaluation); if (hasIHCResult.Success == false) { result.Status = Audit.Model.AuditStatusEnum.Failure; result.Message = hasIHCResult.Message; } } return(result); }
public YellowstonePathology.Business.Rules.MethodResult AreDistributionTypesHandled(YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); result.Success = true; foreach (TestOrderReportDistribution testOrderReportDistribution in this) { switch (testOrderReportDistribution.DistributionType) { case YellowstonePathology.Business.ReportDistribution.Model.DistributionType.EPIC: if (panelSet.ImplementedResultTypes.Contains(YellowstonePathology.Business.Test.ResultType.EPIC) == false) { result.Success = false; } break; case YellowstonePathology.Business.ReportDistribution.Model.DistributionType.MEDITECH: if (panelSet.ImplementedResultTypes.Contains(YellowstonePathology.Business.Test.ResultType.WPH) == false) { result.Success = false; } break; case YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ATHENA: if (panelSet.ImplementedResultTypes.Contains(YellowstonePathology.Business.Test.ResultType.CMMC) == false) { result.Success = false; } break; case YellowstonePathology.Business.ReportDistribution.Model.DistributionType.ECW: if (panelSet.ImplementedResultTypes.Contains(YellowstonePathology.Business.Test.ResultType.ECW) == false) { result.Success = false; } break; } if (result.Success == false) { result.Message = "Report No " + testOrderReportDistribution.ReportNo + " Distribution Type " + testOrderReportDistribution.DistributionType + " not implemented for " + panelSet.PanelSetName + " - id " + panelSet.PanelSetId.ToString(); break; } } return(result); }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToAccept() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Accepted == true) { result.Success = false; result.Message = "The amendment cannot be accepted because it is already accepted."; } else if (this.m_Text.Contains("???")) { result.Success = false; result.Message = "The amendment cannot be accepted because the text contains ???."; } return(result); }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToUnaccept() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == true) { result.Success = false; result.Message = "The amendment cannot be unaccepted because the amendment is final."; } else if (this.Accepted == false) { result.Success = false; result.Message = "The amendment cannot be unaccepted because it has not accepted."; } return(result); }
public Business.Rules.MethodResult FixationDurationIsOk() { Business.Rules.MethodResult result = new Rules.MethodResult(); result.Success = true; if (this.m_FixationDuration.TotalHours < 6) { result.Message = "Warning! Fixation duration will be under 6 hours unless this specimen is held."; result.Success = false; } else if (this.m_FixationDuration.TotalHours > 72) { result.Message = "Warning! Fixation duration will be over 72 hours if processed normally."; result.Success = false; } return(result); }
public YellowstonePathology.Business.Rules.MethodResult IsOkToSetResult() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (string.IsNullOrEmpty(this.m_Indication) == true) { result.Success = false; result.Message = "You must choose an indication first."; } else if (this.m_Accepted == true) { result.Success = false; result.Message = "The results cannot be set because they have already been accepted."; } return(result); }
public Business.Rules.MethodResult FixationDurationIsOk() { Business.Rules.MethodResult result = new Rules.MethodResult(); result.Success = true; if (this.m_FixationDuration.TotalHours < 6) { result.Message = "Warning! Fixation duration will be under 6 hours unless this specimen is held."; result.Success = false; } else if (this.m_FixationDuration.TotalHours > 72) { result.Message = "Warning! Fixation duration will be over 72 hours if processed normally."; result.Success = false; } return result; }
public static YellowstonePathology.Business.Rules.MethodResult IsOkToSetResult(YellowstonePathology.Business.Test.HPV1618ByPCR.HPV1618ByPCRTestOrder panelSetOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (string.IsNullOrEmpty(panelSetOrder.Indication) == true) { result.Success = false; result.Message = "You must choose an indication first."; } else if (panelSetOrder.Accepted == true) { result.Success = false; result.Message = "The results cannot be set because they have already been accepted."; } return(result); }
public static YellowstonePathology.Business.Rules.MethodResult IsOkToSetResult(YellowstonePathology.Business.Test.HPV1618ByPCR.HPV1618ByPCRTestOrder panelSetOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (string.IsNullOrEmpty(panelSetOrder.Indication) == true) { result.Success = false; result.Message = "You must choose an indication first."; } else if (panelSetOrder.Accepted == true) { result.Success = false; result.Message = "The results cannot be set because they have already been accepted."; } return result; }
public YellowstonePathology.Business.Rules.MethodResult Send() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (result.Success == true) { this.m_Document = new XElement("HL7Message"); this.m_ObxCount = 1; EpicHl7Client client = new EpicHl7Client(); OruR01 messageType = new OruR01(); string locationCode = "YPIIBILLINGS"; if (this.m_ClientOrder.SvhMedicalRecord.StartsWith("A") == true) { locationCode = "SVHNPATH"; } EpicMshView msh = new EpicMshView(client, messageType, locationCode); msh.ToXml(this.m_Document); PidView pid = new PidView(this.m_ClientOrder.SvhMedicalRecord, this.m_ClientOrder.PLastName, this.m_ClientOrder.PFirstName, this.m_ClientOrder.PBirthdate, this.m_ClientOrder.PSex, this.m_ClientOrder.SvhAccountNo, this.m_ClientOrder.PSSN); pid.ToXml(this.m_Document); EpicStatusOrcView orc = new EpicStatusOrcView(this.m_ClientOrder.ExternalOrderId, this.m_OrderingPhysician, this.m_OrderStatus); orc.ToXml(this.m_Document); EpicStatusObrView obr = new EpicStatusObrView(this.m_ClientOrder.ExternalOrderId, string.Empty, this.m_ClientOrder.OrderTime, null, this.m_OrderingPhysician, ResultStatusEnum.InProcess.Value, this.m_UniversalService); obr.ToXml(this.m_Document); EpicStatusObxView obx = new EpicStatusObxView(m_ObxCount); obx.ToXml(this.m_Document); this.m_ObxCount = obx.ObxCount; using (System.IO.StreamWriter sw = new System.IO.StreamWriter(this.m_ServerFileName)) { this.m_Document.Save(sw); } System.IO.File.Copy(this.m_ServerFileName, this.m_InterfaceFilename); } return result; }
public override YellowstonePathology.Business.Rules.MethodResult Distribute(string reportNo, Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); /* YellowstonePathology.Domain.OrderIdParser orderIdParser = new YellowstonePathology.Domain.OrderIdParser(rdl.ReportNo); string fileName = YellowstonePathology.Business.Document.CaseDocument.GetCaseFileNameTif(orderIdParser); FAXCOMEXLib.FaxServer faxServer = new FAXCOMEXLib.FaxServer(); faxServer.Connect("ypiiblfax"); FAXCOMEXLib.FaxDocument faxDoc = new FAXCOMEXLib.FaxDocument(); faxDoc.Body = fileName; string faxNumber = string.Empty; if (rdl.LongDistance == true) { faxNumber = "1" + rdl.FaxNumber; } else { faxNumber = rdl.FaxNumber; } faxDoc.Recipients.Add(faxNumber, rdl.ReportNo); faxDoc.DocumentName = rdl.ReportDistributionLogId; faxDoc.Sender.Company = "YPII"; faxDoc.Subject = rdl.PhysicianName + " - " + rdl.ClientName; faxDoc.Priority = FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptLOW; faxDoc.ConnectedSubmit(faxServer); faxServer.Disconnect(); rdl.CaseDistributed = true; rdl.DateDistributed = DateTime.Now; */ result.Success = true; return result; }
public override YellowstonePathology.Business.Rules.MethodResult IsOkToSend(YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (string.IsNullOrEmpty(accessionOrder.PAddress1) == true) { methodResult.Success = false; } if (string.IsNullOrEmpty(accessionOrder.PCity) == true) { methodResult.Success = false; } if (string.IsNullOrEmpty(accessionOrder.PState) == true) { methodResult.Success = false; } if (string.IsNullOrEmpty(accessionOrder.PZipCode) == true) { methodResult.Success = false; } return methodResult; }
public YellowstonePathology.Business.Rules.MethodResult Post() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.m_PanelSetOrder.HoldBilling == false) { this.PostPQRICodes(); BillingComponent billingComponent = BillingComponent.GetBillingComponent(this.m_PanelSetOrder); billingComponent.Post(this); this.m_PanelSetOrder.PanelSetOrderCPTCodeBillCollection.SetPostDate(DateTime.Today); this.m_PanelSetOrder.PanelSetOrderCPTCodeCollection.SetPostDate(DateTime.Today); this.m_PanelSetOrder.IsPosted = true; methodResult.Success = true; } else { methodResult.Success = false; methodResult.Message = "This case cannot be posted because it is on hold."; } return methodResult; }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToUnaccept() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == true) { result.Success = false; result.Message = "The amendment cannot be unaccepted because the amendment is final."; } else if (this.Accepted == false) { result.Success = false; result.Message = "The amendment cannot be unaccepted because it has not accepted."; } return result; }
public YellowstonePathology.Business.Rules.MethodResult IsOkToUnfinalize() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.m_Final == false) { methodResult.Success = false; methodResult.Message = "Unable to unfinalize the Intraoperative Consultation as it is not finaled."; } return methodResult; }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToAccept() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Accepted == true) { result.Success = false; result.Message = "The amendment cannot be accepted because it is already accepted."; } else if (this.m_Text.Contains("???")) { result.Success = false; result.Message = "The amendment cannot be accepted because the text contains ???."; } return result; }
public YellowstonePathology.Business.Rules.MethodResult IsOkToResetText(YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == true) { result.Success = false; result.Message = "The amendment cannot be reset because the amendment is final."; } else { if (this.HasAbilityToResetText(accessionOrder) == false) { result.Success = false; result.Message = "The amendment cannot be reset because the text is not generated."; } } return result; }
public override Rules.MethodResult DeleteCaseFiles(YellowstonePathology.Business.OrderIdParser orderIdParser) { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; return methodResult; }
public static YellowstonePathology.Business.Rules.MethodResult DeleteCaseFiles(YellowstonePathology.Business.OrderIdParser orderIdParser) { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; string xmlFile = GetCaseFileNameXml(orderIdParser); string docFile = GetCaseFileNameDoc(orderIdParser); string xpsFile = GetCaseFileNameXPS(orderIdParser); string tifFile = GetCaseFileNameTif(orderIdParser); string pdfFile = GetCaseFileNamePDF(orderIdParser); try { if (System.IO.File.Exists(xmlFile) == true) System.IO.File.Delete(xmlFile); if (System.IO.File.Exists(docFile) == true) System.IO.File.Delete(docFile); if (System.IO.File.Exists(xpsFile) == true) System.IO.File.Delete(xpsFile); if (System.IO.File.Exists(tifFile) == true) System.IO.File.Delete(tifFile); if (System.IO.File.Exists(pdfFile) == true) System.IO.File.Delete(pdfFile); } catch (Exception e) { methodResult.Success = false; methodResult.Message = e.Message; } return methodResult; }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToSend(YellowstonePathology.Business.Test.AccessionOrder accessionOrder) { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; return methodResult; }
public YellowstonePathology.Business.Rules.MethodResult DeleteCaseFiles() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; return methodResult; }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToAccept() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Accepted == true) { result.Success = false; result.Message = "The results cannot be accepted because they are already accepted."; } return result; }
public Rules.MethodResult IsOkToAccept() { Rules.MethodResult methodResult = new Rules.MethodResult(); if(this.Accepted == true) { methodResult.Success = false; methodResult.Message = "Result has already been accepted."; } return methodResult; }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToFinalize() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == true) { result.Success = false; result.Message = "This case cannot be finalized because it is already finalized."; } else if (this.Accepted == false) { result.Success = false; result.Message = "This case cannot be finalized because the results have not been accepted."; } return result; }
public YellowstonePathology.Business.Rules.MethodResult Set() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); if (this.m_PanelSetOrder.HoldBilling == false) { this.HandleUseBillingAgent(); this.SetBillingType(); this.SetPanelSetOrderCPTCodes(); methodResult.Success = true; } else { methodResult.Success = false; methodResult.Message = "This case cannot be set because it is on hold."; } return methodResult; }
public Rules.MethodResult HaveResultsBeenSet(AccessionOrder accessionOrder) { YellowstonePathology.Business.Persistence.ObjectCloner objectCloner = new Business.Persistence.ObjectCloner(); object clone = objectCloner.Clone(this); YellowstonePathology.Business.Persistence.DocumentId documentId = new Business.Persistence.DocumentId(clone, this); YellowstonePathology.Business.Persistence.DocumentUpdate document = new Business.Persistence.DocumentUpdate(documentId); Rules.MethodResult result = new Rules.MethodResult(); this.CheckResults(accessionOrder, clone); if(document.IsDirty() == true) { result.Success = false; result.Message = "Results have not been set."; } return result; }
public virtual YellowstonePathology.Business.Rules.MethodResult IsOkToUnfinalize() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == false) { result.Success = false; result.Message = "This case cannot be unfinalized because it is not final."; } return result; }
private YellowstonePathology.Business.Rules.MethodResult OkToSend() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (string.IsNullOrEmpty(this.m_ClientOrder.UniversalServiceId) == true) { result.Success = false; result.Message = "The universal service id is null"; } YellowstonePathology.Business.ClientOrder.Model.UniversalServiceDefinitions.UniversalServiceNone universalServiceNone = new YellowstonePathology.Business.ClientOrder.Model.UniversalServiceDefinitions.UniversalServiceNone(); if (this.m_UniversalService.ApplicationName == universalServiceNone.ApplicationName) { result.Success = false; result.Message = "The universal service is NONE."; } return result; }
public YellowstonePathology.Business.Rules.MethodResult IsOkToMedTechFinal() { YellowstonePathology.Business.Rules.MethodResult methodResult = new Rules.MethodResult(); methodResult.Success = true; YellowstonePathology.Business.Specimen.Model.SpecimenOrder specimenOrder = this.AccessionOrder.SpecimenOrderCollection.GetSpecimenOrder(this.PanelSetOrderLeukemiaLymphoma.OrderedOn, this.PanelSetOrderLeukemiaLymphoma.OrderedOnId); if (specimenOrder == null) { methodResult.Success = false; methodResult.Message = "The specimen for this case has not been selected."; } return methodResult; }
public override YellowstonePathology.Business.Rules.MethodResult IsOkToFinalize() { YellowstonePathology.Business.Rules.MethodResult result = new Rules.MethodResult(); if (this.Final == true) { result.Success = false; result.Message = "This case cannot be finalized because it is already finalized."; } return result; }