How to display a ToDo list based on a form

Hello

In the form I've created, the user who created the entry should put an Xray at first time, and one year later put the same Xray.

For that you've shown how (on another post) to make a notification, based on time.
But when the user receive many emails, when he's connecting to the site, it should be boring to find the emails and follow the link.

How can we build a block, with the notifications for the user inside the site, and with those notifications that would disappeared, when the second Xray is sent?

Thanks

Comments

So...let me get this straight

Hello,

Just so I'm sure I understand...you want a sidebar block in the site, where it says when the user has an xray that they are supposed to get, and it should only show the next xray that the user is supposed to get, if the date for the first one has passed?

So, I need to know your data structure. The user creates an entry in a form, and that means that they should have an xray at some point soon? Does the form contain the date of the xray? Or is there just a notification and one year later you are sending another notification?

If there is a date in the form, then that may be a useful tool here. Or maybe creating a derived value element that stores the date would be useful.

For the second xray in one year, do they create another entry? Is there any record of when that date should be?

If we can figure out the dates based on the entry the user created, then some PHP in a block wouldn't be hard. But it all comes down to knowing the dates I think.

--Julian

Multipage form

Hello Julian

For the creation of an entry, the user have to send an Xray. If he doesn't, he could not make an entry. He should also put the date, when the xRay was took.

One year after the entry was created (I should change it to 1 year after the date of the first Xray, it would be more scientific...), he received a notification by email (like you told us), "you have to upload a new xray for the patient now, following this link...".

Then he goes on the website and update his entry for the patient (on the same form, same entry). It's a multipage form, he goes to the 2nd page (the first Xray was on the first page) and put the second Xray, in an upload box, and put the date of the 2nd Xray, in a date box.

Could we make a block with some php, displaying all the entries that need to be filled?
With some conditions like that:
if (user WhoCreatedEntry == currentUser AND dateToday > dateXray1 + 365 AND uploadXray2 == "BLANK"......)
Display "You have to fill $ entries:"
"link to the entries to fill"
"link to the entries to fill"
"link to the entries to fill"

Thanks

re: xray needed

How will you handle patients that start at different times? Patient 1 starts this year, and patient 2 starts a year later - you could end up with a long chain of tests to find which xrays are due. That is, unless you can just test for the most recent xray and determine if it's been more than a year since it was uploaded.

By also determining how many xrays a patient has, you would also have a good entry point for which page of the form to load (always the number of xrays +1)

Steve

Thanks for your answer

One entry for one patient.

A multipage form, with, depending of the inclusion group, 2 to 4 xRays due, for the patient.
It will be better that the form loaded directly on the page for the xRay, but in fact all of the xRay needed (without the first xRay which is on the first page) are to upload on the page 2, so we always need to open the form on the page 2.

The goal is to show the opportunity for treating in one time or in two treatment time. What's the better growth response?
As there are 3 groups for the study, and different notification time, maybe it would be a too big request...
So we decided to make for start, only a notification after one year to avoid the lost patient which would decreased the studie's value.

Your idea to only make a test for the most recent xRay is a good idea. How would you do that?

Thanks

How does this work?

I think I understand what you're trying to achieve. You want to let someone know to add a new xray a year after the first one.

Is the person who adds the new xray a staff member who looks at many patient records, and they might want to be notified that there are, for example, 5 patients who need new xrays? If that's the case, you might create a new screen, sort by xray upload date, and set a filter to show only ones that are 12 months old. Then the list shows only the 5 patients who need new xrays. In order to work properly, you might have to add a derived value that is the xray add date plus 1 year. Then the filter works on that column and is "<={TODAY}".

Perfect

Why not using a powerful screen?
A really really good idea...
That's perfect

Thanks

For those who want to do it
Just put this piece of code in the php derived value you've created
//loading values where the number 403 is the handle for the date box//

$dateForStart = "403";

//One year later//

$myDate = date("Y-m-d", strtotime("+1 year", strtotime($dateForStart."-01" )));

$value = $myDate;

I've adding a {BLANK} filter in 2nd xRay, to display only entries which are not completed.

Again thanks :-)

Good

I'm glad the screen with filter works!