Skip to main content

Troubleshooting: Event Not Always Honoring Edit Form

I had this issue come up for me recently while working on making placement disruptions more secure. By the nature of placement disruptions, we needed to allow users to go back in and edit the placement disruption to add an end date but we did not want other fields to be editable at that point so I copied the placement disruption forms, made the fields we wanted to lock down not-modifiable and then linked the new forms to the event as the form to use on Edit.

While testing, we noticed that if we saved a new placement disruption and then immediately edited it, the Add form was being used. If we refreshed the list of placement disruptions and then edited the placement disruption, the Edit form was being used as intended. Based on how placement disruptions actually get used, this probably would not be a problem because typically staff will set them up one day and edit them another day, which means that they will have gone through at least one refresh. Still, I was annoyed about this and wanted to figure out how to make it behave. While I used this fix specifically to get the Edit form to be used, you could apply this in any situation where you need the event information to update in the list so that other form functionality works properly as well.

The Problem

I noticed that after saving the placement disruption, the list of placement disruptions did not refresh itself. The most recent placement disruption should be showing at the top of the list but it was being appended at the bottom of the list and the list never refreshed itself to fix the order like it typically does. Also the placement disruption type did not fill in on the list indicating that the list refresh was necessary to update the event information enough to indicate that the edit form should be used on edit instead of the add. A manual refresh made all this happen. So the problem was related to the event listing not refreshing after save.

This is the list of placement disruptions before adding one.
After I added a placement disruption, the list did not refresh. The new placement disruption is at the bottom.
After clicking the Refresh button, the list updated to fill in missing information and list in the proper order.

The Solution

I went through the formfunctions.js file looking for any code snippet that would refresh the listing after save and found one. If you have any forms that do no automatically refresh the event listing after save, you can add the following code to the After Save Code property of the form:

self.refreshCallerWindow = true;

With this code on the form, after I save the form, the list of event automatically refreshed itself rather than requiring me to click the Refresh button. When I click to edit the newly created placement disruption, the Edit form opened.

With the code on the form, after saving, the list displayed with the proper information filled in and in correct order.

Data Entry Form (for New) vs Data Entry Form (for Edit)

myEvolv allows events to use a different form when entering a new event and editing an event. You can indicate which form to use for each in the Events Setup area of myEvolv. Typically you will use the same form for both but there are situations where you may want to consider using different forms. The following are some of the use cases that I have come up with for when you may want to use different forms for new vs. editing. If you have other use cases, please comment below and I will add them to my list.

When does myEvolv use each form?

The form indicated for Data Entry Form (for New) is used

  • when Entering a New Service or Manual Event

The form indicated for Data Entry Form (for Edit) is used

  • when Editing a service or event
  • when Amending a service or event
  • when Viewing a service or event after it has first been saved

Use Cases

1) Preventing Specific Fields from Being Modified on Edit and Amend

There may be some forms that can be edited or amended by clinicians that contain fields whose values should never change. You want to give event-level permission for clinicians to edit the form but prevent specific fields on form from ever being changed.

To accomplish this, you make a copy of the Data Entry Form (for New) and configure the desired columns to be not-modifiable on the Data Entry Form (for Edit).

2) Displaying System Generated Data on Forms After Save

There may be some fields or subreports that you only want to show on the form after the initial data entry has occurred because the fields or subreports may otherwise be empty or not rendering properly.

Example

You have services that require electronic signing or approval and while myEvolv puts a nice signature image with time stamp at the top of the event form, you want to display the approval timestamp on the form itself but you do not want the blank field showing on the form at the time the entry is being made.

Example

You have a subreport on a monthly summary form that is designed to pull in services provided in the same calendar month as the actual_date on the monthly summary form. When a clinician goes to enter a new monthly summary, there is no actual_date on the form so the subreport renders with all of the services ever entered for the individual, which confuses the clinicians. You want to display the subreport on the form only after a value had been saved to the actual_date field.

To accomplish this, you make a copy of the Data Entry Form (for Edit) and configure the desired columns to be not-visible on the Data Entry Form (for New).

3) Hiding the Actual Time on a Service

Many programs do not have a need to record the time that a service was provided so you may be tempted to display the actual_date field on the data entry forms as date only. However, when the time field of the actual_date is not shown on the form, the system inputs a time of “00:00 AM” when the event is saved to the database. If a second service of the same type is entered for a day, you will encounter a service overlap error and myEvolv will prevent you from saving the second service in the system. You need to collect a time when the service is first entered so that you can avoid the service overlap error but never want the time to be shown on the form again.

To accomplish this, you make a copy of the Data Entry Form (for New) and change the actual_date field’s display type to Date Only on the Data Entry Form (for Edit).

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.