Feature Request
-
I have been using cartpauj-pm for some time and I see that much of yours is modeled on that. Yours is much better in many ways. I would like to switch over but I made a few modifications to cartpauj-pm that I would either need to code into yours or if you added it to yours as an option I think it would be a much better program in health care at least:
1. Search by first and last name
2. Show first and last name rather than user id on posts
3. Add an option to search old posts of a given user.I was starting to add these things to your previous version but then you updated. I will need to get the hang of your changes and start over. Adding these elements makes it a much more useful tool for services that are name based rather than user ID based. The changes necessary are not too complicated. I hope you will consider adding this to future iterations. If you are open to receiving modifications from me I would be glad to share on Github etc.
-
Thank you for contacting.
It will not be easy to move from cartpauj-pm to Front End PM. That plugin use different database table where Front End PM use CPT. You have to write custom script for that if you want to keep your messages.
This plugin is actively maintained. You will get update time to time. So core plugin code change is not an option. But this plugin has many hooks. You can use those and can change almost anything of this plugin.Your needed features:
1. Where? This plugin use Display name.
2. Again this plugin use display name not user id. where is it showing user id can you please point me?
3. This feature was there in previous versions. But it was less used featured. We can add again. You can assist me where it will be better to show button or search form for this?Regards
ShamimThanks, I realize the database is different and many other things, nevertheless, it is very similar in the layout and basic function of cartpauj-pm. So, it seems like a good next step for me. My clients are already familiar with cartpauj-pm and so switching to yours would not be a shock to them. And, I would not transfer the database over. I would just keep a legacy button for a couple years and then dump the old database to an archive. However, what I would like is to use the user_meta first and last names rather than email’s and display names because that is how clinicians work with patients and clients. So to make that happen, I modified the search to look through the user_meta table. The following are some mods I was trying out with the previous version:
I see you have got rid of the template file. So I will have to rework this in your new version. But if you look you will see the idea. I think it would be useful for others too. PM is required for medical and mental health applications to be HIPPA compliant in the US. And if we let clients and patients sign up online for services through a patient portal independently we generally will be able to locate them faster by their actual first and last name than some goofy email or display ID they choose. That has been the case for me. I built that into my version of cartpauj-pm. And was adding that to yours as an experiment before I implement it. So that option would help.
Also, seeing the actual patient/client name rather than a display name makes it easier to scan the messages on the message board and know who is addressing me. I hope that is making sense.
Then, in cartpauj-pm I added an option in the directory to be able to view old posts of clients. This is very helpful in medical/mental health practice. If discussing an issue with someone I am able then to refer to earlier posts and bring them back up so I do not have to repeat information. As a clinician, I really needed that so I wrote it in.
So, regardless I will make this happen. But I think your market and a large one is with medical/mental health. So, from my experience these features make it workable in these settings.
Then there is integration with OpenEMR. Cartpauj-pm was built for that. The sunset-patient-portal plugin for OpenEMR would need to be modified to work with your database but that should not be too difficult. I plan to do that.
That is where I am going with this. I really like what you are doing. It is a natural next step for others who use OpenEMR. Cartpauj-pm is looking dated. So, for what it is worth, these are my suggestions.
You can very easily search by meta first name and last name. You can use
fep_autosuggestion_argumentsandfep_directory_argumentshook to modify (If you need code let me know).Display name is what wordpress created to show publicly. You can go to back end user edit page you will see it is written “Display name publicly as”. You can force first name and last name will be display name. See there is a plugin for that also https://ww.wp.xz.cn/plugins/force-first-last/ .
Message between 2 users also can be easily shown. All participants are saved in “_fep_participants” meta. You can query by this meta to show messages between them. (I may add this feature in next version).
Let me know if you have any more query and/or feature request.
The force first last plug in was a simple solution for most of what I am looking for. Thanks. The query all messages between two users would be a great addition. Thanks for the tip on where to build my query. What I did in cartpauj-pm was to add an additional link in the directory (see my image):
This should not be that difficult to build. I will mess with this and make it work. I will also work on the queries to make it integrate with OpenEMR just like cartpauj-pm does.
Thanks for putting this plugin out there!
Craig
-
This reply was modified 8 years, 10 months ago by
cravaus.
The first last name search. What works best is to replace this at line 52 of class-fep-directory.php
if( !empty($_GET['fep-search']) ) { $args['search'] = '*'. $_GET['fep-search'] . '*'; }With this:
if( !empty($_GET['fep-search']) ) { $args = array ( 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'first_name', 'value' => $_GET['fep-search'], 'compare' => 'LIKE' ), array( 'key' => 'last_name', 'value' => $_GET['fep-search'], 'compare' => 'LIKE' ) ) ); }This allows for search of first or last name. The problem is if I have a two clients with the same first and last name. The directory should show first last name and email to distinguish the two. And the email message should show both. I suppose another layer to search the email would be wise. So, although the first last plugin appears to be a solution at first, it is not sufficient.
So what I am adding in directory.php at line 26 i have changed:
<div class="fep-column"><?php esc_html_e( $u->display_name ); ?></div>to
<div class="fep-column"><?php esc_html_e( $u->display_name ); ?>--<?php esc_html_e( $u->user_email ); ?></div>And in viewmessage.php at line 35 I changed it to
<span class="author"><?php the_author_meta('display_name'); ?>--<?php the_author_meta('user_email'); ?></span>This takes away the confusion of similar names in the directory.
Hi again.
You are doing wrong. This way when you will update this plugin all of your changes will be lost.
There are hooks which you can use and can easily modify so that when you update this plugin you will not lose any of your modifications.I messed up this function the first time but this works:
//Frontend PM Pro hooks function fep_directory_firstlast( $args ) { $args = array ('fields' => array( 'ID', 'display_name', 'user_nicename', 'user_email')); $args['search'] = '*'. $_GET['fep-search'] . '*'; return $args; } add_filter( 'fep_directory_arguments', 'fep_directory_firstlast', 10, 3 );And from this I am also able to add the user_emial but I need to change how I do that as you said but at least my function will work with your hook.
Rather than try to modify the plugin search and page formatting to display and search first_name Last_name — user_email, it is easier to just change the display name to be formatted this way. To do this I have modified the force-first-last plugin so that the display name is formatted this way.
On line 40
$display_name = trim($_POST['first_name'] . " " . $_POST['last_name'] . "--" . $_POST['user_email']);On line 60
$display_name = trim($info->first_name . ' ' . $info->last_name . '--' . $info->user_email);Now it is all searching and appearing as I need it to. The next issue is the button to search old posts from clients.
-
This reply was modified 8 years, 10 months ago by
The topic ‘Feature Request’ is closed to new replies.