We have tried several variables and can't get this to work.
We want to be able to right click on an appointment, go to clipboard, click actions, click "print a document" and have a document that pulls the date from that appt that we clicked on. How do we accomplish this?
The variables <Apptdate> and <ApptStartTime> for documents will only pull the date for an appointment if the document is linked to the system event for an appointment being checked out. Otherwise, it will just leave a blank space.
It cannot pull a date when printed from the action button on the clipboard since it does not know what appointment it should be pulling the information from.
I am far from being a computer whiz, but hear me out....
PW obviously had a variable/field somewhere that indicates when the next recall appointment is - otherwise, it would not be able to populate a date in the following screen - where it clearly differentiates between a recall appointment and a non-recall appointment:
So how do we tap into this data to create a letter?
You are wanting to make it use the Next recall appointment's date?
If that is the case then the variable you would want to use on the Document is Next Recall Date under the Patient info category.
This variable will work from the clipboard's action button, as long a the patient has a recall appt scheduled.
Ok, So I'm not 100% sure what date you are wanting the document to pull, so just in case:
If you want to pull the next recall due date, which is based on the recall cycle, you would use the built-in "Next recall date" variable.
If you want to pull the Next Scheduled Recall appointment or the Next scheduled non-recall Appointment you will need to add in a custom merge variable.
When you have a document editor window open, you would click on the Edit Merge Fields button on the lower right. Once the list is open you will click on the Define New button. This will bring up the window to create the new variable.
To get the Next Scheduled Recall Appointment You can set it up similar to this variable
The Formula is DateStr(NextRecallApptDate(Patient.PersonID, Today(), 0))
For pulling the next scheduled non-recall appointment - You could use the built-in variable "Patient Next Appt date" however if their next appointment is a recall appointment it would pull that date. If you want it to be purely the next non-recall appt date you can set up a variable like this one.
The formula is DateStr(NextNonRecallApptDate(Patient.PersonID , Today(), 0))
If you are wanting it to pull today's checked out appointment it would need to use the "ApptDate" variable and then be connected to the system event for checking out the appointment, or you can use the "Last visit Date" variable and as long as you're printing it after the appointment has been fully checked out, it will pull that date as the last appointment date.
If you are needing it to be something other than one of these, let me know.