This project has moved and is read-only. For the latest updates, please go here.

Formatting on 1500 transform slightly off

Aug 5, 2015 at 9:01 PM
Edited Aug 5, 2015 at 9:01 PM
Hi there!

First, thank you so much for the amazing effort put into creating this library. It's already saved my team and I a great deal of time as we build an EMR for a client.

At the moment we are working to generate 1500 form output that can be printed onto a 1500 form. It's awesome that this is supported at all (again, kudos for doing this!) We are having a problem with the alignment of some of the output though, and I wanted to see if there's anything we can do to customize the output formatting. Our function is below, and a screenshot of the output is here.

Many thanks!
public byte[] Generate1500File(byte[] doc)
        {
            using (var stream = new MemoryStream(doc))
            {
                var service = new ClaimFormTransformationService(
                    new ProfessionalClaimToHcfa1500FormTransformation(""),
                    new InstitutionalClaimToUB04ClaimFormTransformation(""),
                    new ProfessionalClaimToHcfa1500FormTransformation("")
                    );

                OopFactory.X12.Hipaa.Claims.ClaimDocument document = service.Transform837ToClaimDocument(stream);

                XmlDocument foDocument = new XmlDocument();

                string foXml = service.TransformClaimDocumentToFoXml(document);
                foDocument.LoadXml(foXml);

                using (var outputStream = new MemoryStream())
                {
                    var driver = Fonet.FonetDriver.Make();

                    driver.Render(foDocument, outputStream);

                    return outputStream.ToArray();
                }
            }
        }
Aug 31, 2015 at 8:58 PM
Josh,

Sorry I didn't notice this earlier. From your offline contact I assumed you were using the included GIF as an overlay, but this looks like you are using preprinted HCFA form stock. If this is the case, then the alignments from the included GIF overlay probably won't come out very well, but it shouldn't be too hard to adjust them
Sep 11, 2015 at 7:52 PM
This library is great. Did anybody look at the transformation into CMS-1500 which is slightly different from HCFA1500. E.g ProfessionalClaimToCMS1500FormTransformation in addition to ProfessionalClaimToHcfa1500FormTransformation
Oct 1, 2015 at 5:27 PM
So the original implementation is from an image that I screen scraped, so it's probably not compliant with official HCFA form stock. IF you create a work item with the image you need to align, I can try to update the image to align with the standard form.

If you think the relative spacing works, but just the offsets need to be tweeked, I can probably add some configuration that allows you inject X and Y offsets into the PDF transformation. That's probably best, but I would like you to share what offsets actually work for you so that I could make that part of the default.
Nov 5, 2015 at 10:58 AM
You can modify the page margins in the xslt FormDocument-ToFoXml.xslt and this will allow you to move the text around. I will see if I can make those into arguments that can configured in the program's app.config in the next release.
        <fo:simple-page-master page-width="8.5in" page-height="11in" margin="0.0in" master-name="hcfa1500">
          <fo:region-body margin-top="0.0625in" margin-left="0.0625in" margin-right="0.140in" />