Tag: agency intake

This post comes from a reader request. The scenario she was facing is that when a referral is created in myEvolv, you must enter a referral source and a referral reason on the form. When you go to perform an intake from the referrals, this information is not pulled into the client record. She wanted to have the Referral Source and Referral Reason fields on the client initial enrollment AND also have those fields pre-populate with the options that were selected on the referral.

Intake Form Setup

The Initial Enrollment from Accepted Referral form is in the Agency Intake form family. Agency intake events are not user modifiable so we have to modify the system form to add the fields for Referral Source and Referral Reason.

Referral forms use the refrerrals_to_agency table and the intake forms use the service_track table, so we will need to add new database fields to the intake form to hold our Referral Source and Referral Reason values. We will set them up just as they are on the referral form, using the same picklist and and dependencies.

Referral Reason

We add a new database field called udf_referral_reason and give it the following attributes:Data Type: Foreign Key IDForeign Key Column:referral_reason: referral_reason_idLook-up Table Used: Referral Reason Table

Default Values

At this point, the intake form has a place to store the referral source and referral reason but the user would have to manually re-select those values, which is a pain and also error-prone. We know the information is in the referrals_to_agency table, so we can use the getDataValue() form function to obtain the data but how do we know which row to select.

When you perform a client intake from accepted referral, the intake event “belongs to” the referral made event. The referral made events are the subform entries for Program Recommendations on the Referral form. In turn, those referrals made events “belong to” the referral form that houses the referral source and referral reason data we need. Once you have selected the accepted referral from which you are completing the intake, myEvolv sends a belongs2Event parameter to the intake form so that when the intake is saved, the intake is linked to the parent referral made. That value is equal to the event_log_id of the referral made event, which means we can plug it into the getDataValue() form function to get the value that referral made event’s parent event_log_id and then use that value to return the referral source and referral reason values.

Explanation of Code

First we use the belongs2Event value that is passed to the intake form from the referral made event so that myEvolv can properly link the two events in the tables. We use that value to get the event_log_id of the referral made event’s parent event which is the referral event using the form function getDataValue()

We then use referral event’s event_log_id to get the value of the referral source and referral reason fields on that referral event again using getDataValue()

Conclusion

With this setup in place, when you perform an intake from accepted referral, the referral reason and referral source from the related referral should be on our intake form. Note that this setup enters duplicate data to what is on the referrals_to_agency table into your service_track_x table. If we wish to avoid saving duplicate data to the database, we can setup the new fields on the Intake form as variables instead. This will allow us to display the referral source and referral reason on the intake form when it is opened in myEvolv but no data from the variables will be saved to tables when the intake is saved.

Follow Me

Follow me to receive updates when new posts are created!

Contact Me

If you have a general question or want to request a topic for me to cover in a future blog post, let me know!

Categories

Disclaimer

This blog covers off-script configuration of the myEvolv electronic health record.
Netsmart's official documentation warns against making changes to some of the parts of myEvolv that are covered in this blog's posts. Further, Netsmart support does not cover problems that may arise from customization of myEvolv outside of what their official documentation provides guidance for.
Be advised that implementation of anything contained in this blog has the potential to break your instance of myEvolv and that a fix may require expensive custom work to be performed by Netsmart. Implement at your own risk and test thoroughly in your development environment before implementing in your production environment.