public void X12ToClaimModelTest()
        {
            Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("OopFactory.X12.Hipaa.Tests.Unit.Claims.TestData.ProfessionalClaim1.txt");

             var service = new ProfessionalClaimToHcfa1500FormTransformation("");

            // send the x12 stream in to obtain a claim object
             var document = service.Transform837ToClaimDocument(stream);
             var hcfaclaim = service.TransformClaimToHcfa1500(document.Claims.First());
            Assert.AreEqual("SMITH, TED", hcfaclaim.Field02_PatientsName);
            Assert.IsFalse(hcfaclaim.Field01_TypeOfCoverageIsMedicare);
            Assert.IsFalse(hcfaclaim.Field01_TypeOfCoverageIsMedicaid);
            //Assert.AreEqual("1943-05-01T00:00:00", hcfaclaim.Field03_PatientsDateOfBirth);
            Assert.IsFalse(hcfaclaim.Field03_PatientsSexFemale);
            Assert.IsTrue(hcfaclaim.Field03_PatientsSexMale);
            Assert.AreEqual("99213", hcfaclaim.Field24_ServiceLines.First().ProcedureCode);
            Assert.AreEqual("87070", hcfaclaim.Field24_ServiceLines[1].ProcedureCode);
            Assert.AreEqual("99214", hcfaclaim.Field24_ServiceLines[2].ProcedureCode);
            Assert.AreEqual("86663", hcfaclaim.Field24_ServiceLines[3].ProcedureCode);
            /*
             Assert.AreEqual("BEN KILDARE SERVICE", hcfaclaim.Field32_ServiceFacilityLocation_Name);
            Assert.AreEqual("234 SEAWAY ST", hcfaclaim.Field32_ServiceFacilityLocation_Street);
            Assert.AreEqual("MIAMI", hcfaclaim.Field32_ServiceFacilityLocation_City);
            Assert.AreEqual("FL", hcfaclaim.Field32_ServiceFacilityLocation_State);
            Assert.AreEqual("2345 OCEAN BLVD", hcfaclaim.Field33_BillingProvider_Street);
            Assert.AreEqual("MAIMI", hcfaclaim.Field33_BillingProvider_City);
            Assert.AreEqual("FL", hcfaclaim.Field33_BillingProvider_State);
            Assert.AreEqual("33111", hcfaclaim.Field33_BillingProvider_Zip);
             */
            Trace.Write(hcfaclaim.Serialize());
        }
Пример #2
0
 private static void UpdateEdiTest()
 {
     using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("EdiTransform.ProfessionalClaim1.txt"))
     {
         var parser = new X12Parser();
         var interchanges = parser.ParseMultiple(stream);
         var service = new ProfessionalClaimToHcfa1500FormTransformation("");
         ClaimDocument doc = service.Transform837ToClaimDocument(interchanges.First());
         var claim = doc.Claims.First();
         claim.ServiceLines[0].Procedure.ProcedureCode = "87070";
         claim.ServiceLines[1].Procedure.ProcedureCode = "99213";
         claim.BillingProvider.TaxId = "12345";
         XmlDocument newdoc = TransformClaimDocumentTo837(interchanges.First(), claim);
         string x12 = parser.TransformToX12(newdoc.OuterXml);
         var modifiedInterchange = parser.ParseMultiple(x12).First();
         string newX12 = modifiedInterchange.SerializeToX12(true);
         Debug.WriteLine("After passing through interchange object:");
         Debug.WriteLine(newX12);
     }
 }