<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif">Yes, I would probably also not use R but rather Python. But basically any programming language will do, that can access a database and pull out the desired fields.</div><div class="gmail_default" style="font-family:times new roman,serif"><br></div><div class="gmail_default" style="font-family:times new roman,serif">Uwe</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Fr., 5. Apr. 2024 um 09:58 Uhr schrieb Steve Litt <<a href="mailto:slitt@troubleshooters.com">slitt@troubleshooters.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Christopher W. Ryan via texhax said on Wed, 3 Apr 2024 12:24:00 -0400<br>
<br>
>I dream of using R, Rmarkdown, knittr, and pdflatex to pull individual<br>
>records from a database and generate a form like page 1 here:<br>
><br>
><a href="https://www.cigna.com/static/www-cigna-com/docs/form-cms1500.pdf" rel="noreferrer" target="_blank">https://www.cigna.com/static/www-cigna-com/docs/form-cms1500.pdf</a><br>
<br>
I'm not sure R, Rmarkdown, and knitter are the right tools. More<br>
later...<br>
<br>
<br>
>one pdf form per database record, with the form fields populated. Then<br>
>I could print them, and mail the bills to patients' insurers.<br>
><br>
>The contents of many of the fields will be static: all records in the<br>
>database pertain to the same lab test, all are ordered by the same<br>
>physician (me), and all tests are conducted in the same place.<br>
><br>
>The R coding seems straightforward, but using pdflatex to reproduce<br>
>this complex layout strikes me as daunting--even before trying!<br>
>Opinions: is this a fool's errand? Should I not even try?<br>
<br>
I was doing this formatting in the 1980's. The trick is to use a<br>
monospace font so you can treat the page as a 2 dimensional array.<br>
<br>
It's amazing how little those forms have changed since I created<br>
software to fill them in in almost 40 years ago. I see nothing on that<br>
form requiring statistics. Assuming all necessary data is already in a<br>
database, you can simply use any old language to read the database,<br>
employ a few business rules, fill in a 66x80 2 dimensional array, create<br>
a text file from the array, then run enscript or whatever to turn it<br>
into a postscript or PDF with the proper monospace font.<br>
<br>
This sounds easy to me. The only difficulties I expect are making sure<br>
all necessary data is available for reading, and all laws and rules are<br>
turned into business rules which are then turned into code. I've done<br>
it: It's not hard.<br>
<br>
SteveT<br>
<br>
Steve Litt <br>
<br>
Autumn 2023 featured book: Rapid Learning for the 21st Century<br>
<a href="http://www.troubleshooters.com/rl21" rel="noreferrer" target="_blank">http://www.troubleshooters.com/rl21</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Dr. Uwe Ziegenhagen</div><div>0179-7476050<br><<a href="http://www.uweziegenhagen.de" target="_blank">http://www.uweziegenhagen.de</a>></div></div></div>