Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 2869 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi All,

I'm struggling with a script. I have three tables - Clients, Progress notes, and Add on progress notes. From a layout on the clients table I want to go to related records in the Progress notes table and if a field (Set AON) is set to "1" the script will print the progress note and then go to the add on progress notes table and print the related record(s). Then back in the Progress notes table, if the field (Set AON) is blank, print the progress note record.

Below is what I have but it's not working as I expected. It is printing each of the records from the progress notes table first, then prints the record from the Add on Progress Notes (I'm actually not printing them but trying to save them all to a PDF file which can be saved or printed).

I know this seems convoluted but I need these steps to happen in this order because I need the Add On Progress Note to Print right after the the Progress Note since they go together. Also I need the Progress Notes to be in order by date.

I'm using FM Pro 13 Advanced (13.0v9) on a MacBook (other users are running XOS and Windows) with macOS Sierra Version 10.12.2.

Any help would be greatly appreciated. I have struggled with this for several days with no luck. I would say I'm a beginner to intermediate with FM. Scripting in FM comes after my real jobs of being a mental health professional and a small business owner so I go for several months at a time between working on the development side of FM. Actually, I could use some therapy myself after fighting with this script!

 

 

 

Print Progress Notes.pdf

Posted

It would be easier for me to fix the script with a sample file, but I see a few problems.

First may be structure.  I wonder about Progress notes and Add on Progress notes being in separate tables.  But that aside a few questions.

If a Client has Progress notes, can I assume AON (add on notes) is set to 1 when there are add on notes in a related table?  If so, how is it set, and do you even need to set this flag field.

Also what happens after you print all of these records.  Are you omitting them or marking them in a way that prevents them from reprinting when the client has more Progress Notes?

I see you flipping back and forth between layouts when it may not be necessary.

Are you only printing one client at a time?

A simpler way may be to forget the flag field and check for related records in the Add on notes table.

From the start I would first check for related records in an If statement, then set the client ID, then go to related records.  This way if there are no related records, you don't enter the loop.

Sort records instead of Sort Records by Field

Then I would enter the loop and Print (save to PDF) the first Note.

Then I would check for related records with an IF statement for Add on Progress Notes.

If Add on Notes, you enter the inner loop and you go to related records, new window, to the proper layout, and print (append) each on of those, then close window.

If No add on notes, you continue on outer loop, to next Notes related record.

Posted

Steve, thanks for responding. I will give your suggestions a try.

In response to your questions:

I have two separate tables for the Progress Notes and Add On Notes as separate tables for a couple of different reasons. The Add On Notes takes place at a later time on the same day as the original note and it impacts the CPT coding in yet another table (Claims). I have thought of creating one table to hold both but that would require a major change to the structure of my tables (I just don't have time to make those changes and I'm worried about what kind of problems will occur with that kind of change). 

The AON field is set to 1 via a script initialed by the user when they create the Add on Note.

Once the notes are printed (saved to PDF) they are either emailed to someone or printed out and given to someone. We often get requests for records from attorneys, disability admin, and others. So at any given time all the client's progress notes might need to be printed or emailed. So these records might need to be printed again in the future with any additional notes. 

I would only ever need to print one set of notes for a given client. So only printing one client at a time.

Thanks again for the suggestions which I will try. What really drives me crazy is that what is inside the Loop works in a separate script when I just print one record. 

Peggy

This topic is 2869 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.