public EPICFT1ResultView(Business.Test.AccessionOrder accessionOrder, Business.Test.PanelSetOrderCPTCodeBill panelSetOrderCPTCodeBill, bool testing) { this.m_Testing = testing; this.m_AccessionOrder = accessionOrder; this.m_PanelSetOrderCPTCodeBill = panelSetOrderCPTCodeBill; this.m_CptCode = Business.Billing.Model.CptCodeCollection.Instance.GetCptCode(this.m_PanelSetOrderCPTCodeBill.CPTCode); this.m_OrderingPhysician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId); }
public void UpdateCodeType() { foreach (Business.Test.PanelSetOrderCPTCode panelSetCptCode in this) { if (string.IsNullOrEmpty(panelSetCptCode.CodeType) == true) { Business.Billing.Model.CptCode cptCode = Store.AppDataStore.Instance.CPTCodeCollection.GetClone(panelSetCptCode.CPTCode, panelSetCptCode.Modifier); panelSetCptCode.CodeType = cptCode.CodeType.ToString(); } } }
public void Publish(string basePath) { XElement document = new XElement("HL7Message"); Hl7Client client = null; YellowstonePathology.Business.Client.Model.ClientGroupClientCollection hrhGroup = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetClientGroupClientCollectionByClientGroupId("2"); if (hrhGroup.ClientIdExists(this.m_AccessionOrder.ClientId) == true) { client = new EPICHRHClient(); } else { client = new EPICHl7Client(); } DFTP03 messageType = new DFTP03(); YellowstonePathology.Business.Domain.Physician orderingPhysician = YellowstonePathology.Business.Gateway.PhysicianClientGateway.GetPhysicianByPhysicianId(this.m_AccessionOrder.PhysicianId); string locationCode = "YPIIBILLINGS"; if (this.m_PanelSetOrderCPTCodeBill.MedicalRecord.StartsWith("A") == true) { throw new Exception("Cant send CDM for an A Number: " + this.m_AccessionOrder.SvhMedicalRecord); } EPICMshView msh = new EPICMshView(client, messageType, locationCode); msh.ToXml(document); EpicPidView pid = new EpicPidView(this.m_PanelSetOrderCPTCodeBill.MedicalRecord, this.m_AccessionOrder.PLastName, this.m_AccessionOrder.PFirstName, this.m_AccessionOrder.PBirthdate, this.m_AccessionOrder.PSex, this.m_PanelSetOrderCPTCodeBill.Account, this.m_AccessionOrder.PSSN); pid.ToXml(document); Business.Billing.Model.CptCode cptCode = Store.AppDataStore.Instance.CPTCodeCollection.GetClone(this.m_PanelSetOrderCPTCodeBill.CPTCode, this.m_PanelSetOrderCPTCodeBill.Modifier); DateTime transactionDate = m_AccessionOrder.CollectionDate.Value; DateTime transactionPostingDate = this.m_PanelSetOrderCPTCodeBill.PostDate.Value; EPICFT1View epicFT1View = new EPICFT1View(cptCode, transactionDate, transactionPostingDate, this.m_PanelSetOrderCPTCodeBill.Quantity.ToString(), orderingPhysician, this.m_AccessionOrder.MasterAccessionNo); epicFT1View.ToXml(document, 1); string fileName = System.IO.Path.Combine(basePath, this.m_PanelSetOrderCPTCodeBill.PanelSetOrderCPTCodeBillId + "." + cptCode.Code + ".hl7.xml"); using (System.IO.StreamWriter sw = new System.IO.StreamWriter(fileName)) { document.Save(sw); } }
public bool HasCodesWithMedicareQuantityLimit() { bool result = false; foreach (YellowstonePathology.Business.Test.PanelSetOrderCPTCode panelSetOrderCPTCode in this) { Business.Billing.Model.CptCode cptCode = Store.AppDataStore.Instance.CPTCodeCollection.GetClone(panelSetOrderCPTCode.CPTCode, panelSetOrderCPTCode.Modifier); if (cptCode.HasMedicareQuantityLimit == true) { result = true; break; } } return(result); }