Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

need to print what I see in a portal

Featured Replies

I am stuck on what seems to be an easy layout. I have a table of medical patients and within that are two portals, one for medication allergies (each patient can have many allergies) and below that a portal for their medications. In the medication portal there is an active checkbox and the portal sorts active to top and inactive to the bottom. (again each patient can have many medications). All I want to do is on that same page have 1 button that will create a report that I can print with patient being worked on at the top, then allergies and then only the active medications. Would appreciate any ideas. I will attach a sample file without any real patient data. Thanks

patientsCopy.zip

What you need is a similar portal, but with an AND match on the Active field. In this case I created a "constant" calculation, =1, to add to the left side of the relationship.

I also added a little script to print from there. It creates a new window to do the printing. It sets the PatientID into a global field, then uses that to isolate the current record. So it can print only 1 record, without losing the found set; or relying on setting the Printer settings to Current Record (which I couldn't do reliably for your PC from my Mac). You can toss it if you don't need it.

I modified the portal so that it would fit on one page. Font sizes can be considerably smaller and still print fine.

You had a button to delete the portal row at the top of the page. I consider this dangerous, as you could easily delete the wrong row; so I removed it and put a little trash can in the row itself.

patients2.zip

  • Author

Thank you. An excellent solution. Let me recap so that I understand. You created a new layout with new portal relationships. The medication portal will only show the active medications because it has to match both the patient id AND active=1. You did this by adding a constant field always equal to "1". Then you load the patient being worked on into a global field so that it stores the current patient.

My only concern is that you are still printing from a portal. What happens if the patient has 10 allergies (only 9 show up in the portal). It is like a screen dump of what you see but more data could be there and not showing. It is rare but some patients may have that many allergies.

Thanks.

The following is my method of printing portal data.

Create a temp print field in a single record TO.

script:

go to field Drug_Reactions::DrugNameField,

go to portal row first

Loop

setfield(TempPrintField,

Case(TempPrintField is empty; Drug_Reactions::DrugNameField & "-"&Drug_Reactions::DrugReaction; TempPrintField &"PP"& Drug_Reactions::DrugNameField&"-"& Drug_Reactions::DrugReaction)

Go to next row

End loop exit after last

go to layout "print portal" (no layout formating or visible portal but has the temp print field expanded so that there is more than enough length to accomodate the maximal number of lines of data possilbe and formated for sliding and printing (if necessary for headers and other labels).

page set up

print

go to original layout

(PP is ment to be the paragraph mark)

The result is you see the portal rows highlight momentarily as the loop loops (an entertaining bit of drama) and you have your print. You shouldn't see the shift to the other layout and back. This has worked for me for the last several years on my EMR. My patient data sheet has a field for the PMH list, another for the meds list and a third for the drug reactions list, all populated with scrips as above.

Good luck.

I forgot to mention that the portal is set to show the acitve data (manipulating the matchfield) before the transfer of data to the temp print field. You could also just add the script step: if status = inactive go to next portal row, but this would slow the process down.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.