I am designing a solution for my therapy practice. The contracts I have allow for billing to occur twice a month (15th and the 30th).I would like to be to write a script that will allow me to create an invoice and search out and display all unpaid therapy notes. I have a Therapy_Notes (TN) table and Invoice (In) table which are joined by an Therapy_Invoice Table.
I would like to do the following:
1. Build a script that will take the Parent ID from the Invoice Record
2. Perform search for all the unpaid therapy notes and grab all relevant Therapy Note ID's
3. Lastly, go to the Therapy_invoice Join table and input all Relevant Therapy note ID's and single parent Invoice ID.
I have been able to do the following:
Create the new invoice, Set the variable to the invoice ID, goto therapy note layout and perform search for all eligible therapy notes.
I am having trouble with:
capturing all relevant therapy note IDs and creating/populating the necessary records in the therapy_invoice Join table.