private void HyperlinkReceiveMaterialFromBillings_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Facility.Model.FacilityCollection facilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities(); YellowstonePathology.Business.Facility.Model.Facility fromFacility = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); YellowstonePathology.Business.Facility.Model.Location fromLocation = new YellowstonePathology.Business.Facility.Model.LocationDefinitions.NullLocation(); YellowstonePathology.Business.Facility.Model.Facility toFacility = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteCody(); YellowstonePathology.Business.Facility.Model.Location toLocation = new Business.Facility.Model.LocationDefinitions.PamCleggOffice(); string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch materialTrackingBatch = new YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch(objectId, "Receive material from Billings", fromFacility, fromLocation, toFacility, toLocation, this.m_MasterAccessionNo); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(materialTrackingBatch, Window.GetWindow(this)); YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLogCollection materialTrackingLogCollection = new Business.MaterialTracking.Model.MaterialTrackingLogCollection(); this.ViewBatch(this, new YellowstonePathology.UI.CustomEventArgs.MaterialTrackingBatchEventArgs(materialTrackingBatch, materialTrackingLogCollection)); }
public static YellowstonePathology.Business.Rules.MethodResult IsOkToFinal(KRASStandardReflexResult krasStandardReflexResult) { YellowstonePathology.Business.Rules.MethodResult result = new YellowstonePathology.Business.Rules.MethodResult(); YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings ypi = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); if (krasStandardReflexResult.KRASStandardReflexTestOrder.Final == false) { if (krasStandardReflexResult.KRASStandardTestOrder.Final == false) { result.Success = false; result.Message = "This case cannot be finalized because the KRAS Standard Test Order is not final."; } else if (krasStandardReflexResult.BRAFV600EKTestOrder != null && krasStandardReflexResult.BRAFV600EKTestOrder.Final == false) { result.Success = false; result.Message = "This case cannot be finalized because it the BRAF V600E/K Test Order is not final."; } else if (krasStandardReflexResult.KRASStandardReflexTestOrder.TechnicalComponentBillingFacilityId == ypi.FacilityId) { if (string.IsNullOrEmpty(krasStandardReflexResult.KRASStandardReflexTestOrder.TumorNucleiPercentage) == true) { result.Success = false; result.Message = "This case cannot be finalized because the Tumor Nuclei Percent is not set."; } } } else { result.Success = false; result.Message = "This case cannot be finalized because it is already finalized."; } return(result); }
private void HyperlinkSendMaterialFromCodyToBillings_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Facility.Model.FacilityCollection facilityCollection = Business.Facility.Model.FacilityCollection.GetAllFacilities(); YellowstonePathology.Business.Facility.Model.Facility fromFacility = new YellowstonePathology.Business.Facility.Model.YellowstonePathologistCody(); YellowstonePathology.Business.Facility.Model.Location fromLocation = new YellowstonePathology.Business.Facility.Model.LocationDefinitions.PamCleggOffice(); YellowstonePathology.Business.Facility.Model.Facility toFacility = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); YellowstonePathology.Business.Facility.Model.Location toLocation = new YellowstonePathology.Business.Facility.Model.LocationDefinitions.NullLocation(); string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch materialTrackingBatch = new YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingBatch(objectId, "Send material to Billings", fromFacility, fromLocation, toFacility, toLocation, this.m_MasterAccessionNo); YellowstonePathology.Business.Persistence.DocumentGateway.Instance.InsertDocument(materialTrackingBatch, Window.GetWindow(this)); YellowstonePathology.Business.MaterialTracking.Model.MaterialTrackingLogCollection materialTrackingLogCollection = new Business.MaterialTracking.Model.MaterialTrackingLogCollection(); this.ViewBatch(this, new YellowstonePathology.UI.CustomEventArgs.MaterialTrackingBatchEventArgs(materialTrackingBatch, materialTrackingLogCollection)); }
private void HyperLinkSendToNeogenomics_Click(object sender, RoutedEventArgs e) { YellowstonePathology.Business.Facility.Model.NeogenomicsIrvine neo = new YellowstonePathology.Business.Facility.Model.NeogenomicsIrvine(); YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings ypi = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); this.m_TaskOrder.TaskOrderDetailCollection.Clear(); YellowstonePathology.Business.Test.PanelSetOrder panelSetOrder = this.m_AccessionOrder.PanelSetOrderCollection.GetPanelSetOrder(this.m_TaskOrder.ReportNo); panelSetOrder.TechnicalComponentBillingFacilityId = ypi.FacilityId; panelSetOrder.TechnicalComponentFacilityId = neo.FacilityId; panelSetOrder.ProfessionalComponentBillingFacilityId = neo.FacilityId; panelSetOrder.ProfessionalComponentFacilityId = neo.FacilityId; YellowstonePathology.Business.Task.Model.TaskSendBlockToNeogenomics task = new Business.Task.Model.TaskSendBlockToNeogenomics(); string taskOrderDetailId = YellowstonePathology.Business.OrderIdParser.GetNextTaskOrderDetailId(this.m_TaskOrder.TaskOrderDetailCollection, this.m_TaskOrder.TaskOrderId); string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString(); YellowstonePathology.Business.Task.Model.TaskOrderDetail taskOrderDetail = new Business.Task.Model.TaskOrderDetail(taskOrderDetailId, this.m_TaskOrder.TaskOrderId, objectId, task); this.m_TaskOrder.TaskOrderDetailCollection.Add(taskOrderDetail); }
public static YellowstonePathology.Business.Rules.MethodResult IsOkToFinal(KRASStandardReflexResult krasStandardReflexResult) { YellowstonePathology.Business.Rules.MethodResult result = new YellowstonePathology.Business.Rules.MethodResult(); YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings ypi = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); if (krasStandardReflexResult.KRASStandardReflexTestOrder.Final == false) { if (krasStandardReflexResult.KRASStandardTestOrder.Final == false) { result.Success = false; result.Message = "This case cannot be finalized because the KRAS Standard Test Order is not final."; } else if (krasStandardReflexResult.BRAFV600EKTestOrder != null && krasStandardReflexResult.BRAFV600EKTestOrder.Final == false) { result.Success = false; result.Message = "This case cannot be finalized because it the BRAF V600E/K Test Order is not final."; } else if (krasStandardReflexResult.KRASStandardReflexTestOrder.TechnicalComponentBillingFacilityId == ypi.FacilityId) { if (string.IsNullOrEmpty(krasStandardReflexResult.KRASStandardReflexTestOrder.TumorNucleiPercentage) == true) { result.Success = false; result.Message = "This case cannot be finalized because the Tumor Nuclei Percent is not set."; } } } else { result.Success = false; result.Message = "This case cannot be finalized because it is already finalized."; } return result; }
public override YellowstonePathology.Business.Audit.Model.AuditResult IsOkToFinalize(Test.AccessionOrder accessionOrder) { Audit.Model.AuditResult auditResult = base.IsOkToFinalize(accessionOrder); if(auditResult.Status == Audit.Model.AuditStatusEnum.OK) { if (string.IsNullOrEmpty(this.m_ResultCode) == true) { auditResult.Status = Audit.Model.AuditStatusEnum.Failure; auditResult.Message = "This case cannot be finalized because the results have not been set."; } else { YellowstonePathology.Business.Test.KRASStandardReflex.KRASStandardReflexTest krasStandardReflexTest = new KRASStandardReflex.KRASStandardReflexTest(); if (accessionOrder.PanelSetOrderCollection.Exists(krasStandardReflexTest.PanelSetId, this.OrderedOnId, true) == false) { YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings ypi = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); if (this.TechnicalComponentFacilityId == ypi.FacilityId) { if (string.IsNullOrEmpty(this.TumorNucleiPercentage) == true) { if (accessionOrder.PanelSetOrderCollection.Exists(krasStandardReflexTest.PanelSetId) == false) { auditResult.Status = Audit.Model.AuditStatusEnum.Failure; auditResult.Message = "This case cannot be finalized because the Tumor Nuclei Percent is not set."; } } } } } } return auditResult; }
public static FacilityCollection GetAllYPFacilities() { FacilityCollection result = new FacilityCollection(); YellowstonePathology.Business.Facility.Model.YellowstonePathologistBillings ypBlgs = new YellowstonePathology.Business.Facility.Model.YellowstonePathologistBillings(); YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings ypiBlgs = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); YellowstonePathology.Business.Facility.Model.YellowstonePathologistCody ypCdy = new YellowstonePathology.Business.Facility.Model.YellowstonePathologistCody(); YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteCody ypiCdy = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteCody(); result.Add(ypBlgs); result.Add(ypiBlgs); result.Add(ypCdy); result.Add(ypiCdy); return(result); }
public override YellowstonePathology.Business.Audit.Model.AuditResult IsOkToFinalize(Test.AccessionOrder accessionOrder) { Audit.Model.AuditResult auditResult = base.IsOkToFinalize(accessionOrder); if (auditResult.Status == Audit.Model.AuditStatusEnum.OK) { if (string.IsNullOrEmpty(this.m_ResultCode) == true) { auditResult.Status = Audit.Model.AuditStatusEnum.Failure; auditResult.Message = "This case cannot be finalized because the results have not been set."; } else { YellowstonePathology.Business.Test.KRASStandardReflex.KRASStandardReflexTest krasStandardReflexTest = new KRASStandardReflex.KRASStandardReflexTest(); if (accessionOrder.PanelSetOrderCollection.Exists(krasStandardReflexTest.PanelSetId, this.OrderedOnId, true) == false) { YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings ypi = new YellowstonePathology.Business.Facility.Model.YellowstonePathologyInstituteBillings(); if (this.TechnicalComponentFacilityId == ypi.FacilityId) { if (string.IsNullOrEmpty(this.TumorNucleiPercentage) == true) { if (accessionOrder.PanelSetOrderCollection.Exists(krasStandardReflexTest.PanelSetId) == false) { auditResult.Status = Audit.Model.AuditStatusEnum.Failure; auditResult.Message = "This case cannot be finalized because the Tumor Nuclei Percent is not set."; } } } } } } return(auditResult); }