Skip to main content

How To: Filter Activity Type and Encounter With Picklists

The activity_type_id and encounter_with_id columns in myEvolv’s Event Log table can come in handy when you are configuring events in myEvolv. If you don’t need to use these columns for their intended purpose, they are easily repurposed to hold other values and since they are event log fields, they can be pulled into the canned reports easily.

The picklist values for these two columns are configured in the Table Maintenance – Extended area of the Setup module.

activity-type-encounter-with-luts

You will notice that unlike the other lookup tables in myEvolv, these two have a Filter Code column.

filter-code-highlighted

Since these lookup tables are connected to Event Log fields that will be available to all events, the picklist could end up holding many more values than would apply to certain events or just more than you would want to display for a particular event. myEvolv provides the Filter Code column so that you can filter the picklist options on particular forms. The following is a guide for how to configure a filtered picklist.

Configure the Lookup Table

In my example, I am going to use the activity_type_id column to capture the method by which a clinician has contacted a family: Phone, Email, Text Message or In-Person

In the table maintenance for Services: Activity Types for Clients, I add an entry for each option and give all of the options a Filter Code of FN_ACT_TYPE

activity-type-lut-with-filter-code

Configure Form

Without filtering, I have the activity_type_id field on my form with the Activity Types for client services Look-up Table selected. When I go to open the picklist, I see the activity type look up table with all active options. The clinicians will need to search through the whole list to find one of the intended options.

unfiltered-picklist

In order to apply the filter, I first need to add a variable to the form. The variable should have a regular string Data Type. In my example, I have given the variable the name activity_type_filter and a caption of FN_ACT_TYPE. The variable also has a default value of ‘FN_ACT_TYPE’ (remember to include the single quotes when setting the default value). The default value must match the filter code that you used in the lookup table. I also toggled the Is Visible setting off so that it is not shown on the form.

variable-properties

Next I need to make the activity_type_id field on the form depend on the value of the variable.

In the Depends On (other) attribute, I add the following code:
getElementFromXML(formXML, 'activity_type_filter')
Note that the second argument is the name of the variable I created.

activity-type-properties

Now when I go to open the picklist, I will only see the options that have the filter code “FN_ACT_TYPE”.

filtered-picklist

Canned Reports

Because I used the activity_type_id, the values in this field will show up in many of the canned reports in myEvolv.

canned-report-activity-type

How To: Create a Custom Formset Member that Shows Only Active Diagnoses

My agency has a program that requires that clients have a script for service on file in order for services to be billable.  Since a script for service requires a diagnosis, we configured the program’s services to require an active diagnosis in order to generate a claim.  As a result, we have client diagnoses expiring on the same date as the script for service.  When a client gets a new script for service, the same diagnosis is re-entered with a new start and end date.  After a few years enrolled in this program, a client’s diagnosis screen begins to get cluttered with inactive diagnoses so our clinicians asked for a way to just see the current diagnoses that were on file rather than all of the diagnoses that had been entered for the client over the years.

myEvolv includes as “Diagnosis – Active” formset member that looks like it was created to serve exactly this function but it would not list any diagnoses that have end dates on them (even future end dates).   Our program’s diagnoses are entered with end dates since we need them to expire at the same time as the script for service.  We were able to get what we wanted by creating a custom formset that uses a custom default form with a modified list condition.  I have outlined the steps we took to accomplish this for our specific scenario but you could apply this in other situations where you want to customize the listing in a formset member.

Step 1: Create a New Default Form for Active Diagnoses

myEvolv’s Active Diagnosis formset member used the “Diagnosis form for listing – active only” form as its default form so we used it as the basis for our new form.

In the form designer, open the “Diagnosis Information” form family.

Right-click to copy the “Diagnosis form for listing – active only”.  Give the new form a name and code.  Ours is called “Active Dx for MyEvolv Launcher”

 

Step 2:  Modify the List Condition

In the new form’s header properties, edit the “List Condition Property”

list-condition-edit

Change the list condition code as shown below

list-condition-code

Explanation of Code and the List Condition Property

myEvolv’s code: event_log.end_date is null and event_log.is_deleted = 0

The List Condition property allows you to use SQL statements to manipulate the data that will be listed on the formset member.  Anything you put in the list condition property will be executed as though it is part of the “WHERE” clause on a SQL query.  In the code above, you can see that myEvolv’s list condition was designed to only list diagnoses that have no end_date and have not been deleted.

We adjusted the list condition to also show us diagnoses with end_dates in the future so I modified the code to:

(event_log.end_date IS NULL OR event_log.end_date > GETDATE()) AND event_log.is_deleted = 0

I used SQL’s GETDATE() function to get today’s date so now in order for the diagnosis to list, it must either have no end_date or an end_date that is greater than today’s date and not have been deleted.

Step 3:  Create a Custom Formset Member

We now need a place to apply the new form we created in myEvolv so that it can be used.  We could just swap put the form for the myEvolv-supplied active diagnosis formset member but since other programs might be using it, we decided to create a custom formset member that was only visible to the clinicians in this program.   Our clinicians use myEvolv Launcher as their home pages in myEvolv.  They are used to clicking on their clients from the My Client’s widget, which launches the My Client Information standalone formset so that is where we wanted to add our custom formset.

Go to Setup > User Tools > Formset Maintenance > FormSet Members and select the ‘My Client Information’  FormSet (it is in the “My Evolv” module)

Create a New “Formset Member – User Defined”.

list-condition-formset-member-setup

You can give the tab any caption or description you would like.  Because we are working with the Diagnoses, we have to pick “Diagnosis” for the Event Category that will allow us to pick the “Diagnosis Information” form family and our default form, “Active Dx for MyEvolv Launcher”.

NB: Once this is setup, remember to give users access to the new form in the Navigation Access Setup.  In this example, the new formset member is listed in the My Evolv Module -> My Client Information section.

Results

The screenshots below were taken on 7/11/2016 so active diagnoses would be those that have no end date or an and date after 7/11/2016.

diagnoses-all

This is the generic “Diagnosis Information” formset member.  It is showing all of the diagnoses (except those that have been deleted) for the client.  You can see that the first two would be active by our program’s definition since we have one with a future end date and one with no end date.  The other three are expired diagnoses and those are the ones that we do not wish to display in our custom formset member.

 

 

diagnosis-filtered-poorly

This is myEvolv’s “Diagnosis – Active” formset member.  It is only listing the active diagnosis that has no end date.

 

diagnoses-active

This is our “Script for Service – Active Only” formset member.  Both active diagnoses are listed.  Success!

 

List Condition Overwrite on Upgrade?

We have noticed that the list condition on this formset member has been overwritten after upgrading our system.  We have a support case about the phenomenon and hopefully it will be resolved in a future release but until then, beware and be sure to save a backup of your custom list condition code to re-apply after upgrades.

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.