New Patient from Calendar

cadprofessor wrote on Sunday, May 09, 2010:

Noobie question….I miss the logic in the new appointment screen from the calendar.  It pops up a box and in the category box it gives you a choice of New Patient.  You select new patient. and then click on the patient box.  It seems to me that it should take you a screen to create a new patient since that is the category you selected.  Instead it takes you to a search box to look established patients.   Is this the way it should work or am I missing something? 

One other question…Once you created a user you can not delete that use?  Since I have found no remove or delete option. 

Thanks for the help….everyone has been great in lending assistance.

bradymiller wrote on Monday, May 10, 2010:

hey,

The language is really centered around the clinical concept and billing concept of ‘New Patient’ appointments and ‘Follow-up’ appointments. Doesn’t mean it’s a new user on the system. That being said, you could always place a ‘Create New Patient’ link in there with coding, if needed.

Regarding users, you can inactivate them in the administration->users configuration screen for the user (untoggle the ‘active’ switch).

-brady

cadprofessor wrote on Monday, May 10, 2010:

Brady,

Thanks for the reply…I was meaning add new patient through the calendar.  It would seem that would be something that someone one the phone would want to do while scheduling an appointment for a new patient.  It would save a couple of steps.  Adding code is beyond my skill level at this time.  

I did see the button to make a user inactive.  Thanks again for you help.

cadprofessor wrote on Monday, May 10, 2010:

Follow up…can you use phpmyadmin to delete users from the database or is the user database linked to another that will cause problems.  Again thanks……

How do I make a suggestion about adding the function for adding a new patient from the calendar?   I am working with a one practitioner optometrist.  They get calls all the time from new patients that have never been in the office before and want to schedule an eye exam.  It would great if the office staff could enter new  patient info from a pop up window much like you get now when the search for patient box appears. after you enter appointment info.  You select new patient in appointment box and up pops the first new patient entry box.  Where you would then enter basic info Name Phone DOB…hit save and goes back to the calendar with appointment made.  When the patients comes in for visit they would then fill out paper work so the rest of there data could be entered into openEMR.     I would tackle this buy I have know idea where to start.    Anyway that is my 2 cents and I hope you will pass this idea along and it gets add to a great piece of software.

cadprofessor wrote on Monday, May 10, 2010:

ok…this is what I found in the add_edit_event.php file. This is the file that is called when you click on time on the calendar.  Since I do not know much about programing this is a shot in the dark.  It looks this section of code does what I am looking for.  So I guess my question is why is it not working or what am I doing wrong?

// Auto-create a new encounter if appropriate.
    //
    if ($GLOBALS &&
            $_POST == ‘@’ && $event_date == date(‘Y-m-d’))
    {
        $tmprow = sqlQuery("SELECT count(*) AS count FROM form_encounter WHERE " .
                        “pid = '” . $_POST . “’ AND date = ‘$event_date 00:00:00’”);
        if ($tmprow == 0) {
            $tmprow = sqlQuery(“SELECT username, facility, facility_id FROM users WHERE id = '” .
                        $_POST . “’”);
                        $username = $tmprow;
                        $facility = $tmprow;
                        // $facility_id = $tmprow;
                        // use the session facility if it is set, otherwise the one from the provider.
                        $facility_id = $_SESSION ? $_SESSION : $tmprow;
                        $conn = $GLOBALS;
                        $encounter = $conn->GenID(“sequences”);
            addForm($encounter, “New Patient Encounter”,
                    sqlInsert("INSERT INTO form_encounter SET " .
                        "date = ‘$event_date’, " .
                        "onset_date = ‘$event_date’, " .
                        “reason = '” . formData(“form_comments”) . "’, " .
                        "facility = ‘$facility’, " .
                        // "facility_id = ‘$facility_id’, " .
                        “facility_id = '” . (int)$_POST . "’, " .
                        “pid = '” . $_POST . "’, " .
                        “encounter = ‘$encounter’”
                    ),
                    “newpatient”, $_POST, “1”, “NOW()”, $username
                );
            $info_msg .= "New encounter $encounter was created. ";

sunsetsystems wrote on Monday, May 10, 2010:

You can deactivate a user by unchecking the “Active” checkbox in the user form, and then saving the form.

Rod
www.sunsetsystems.com

bradymiller wrote on Tuesday, May 11, 2010:

hey,

You can make suggestions in the ‘feature request’ tracker.

For help with coding, probably best to create an tracker item in code review, then you can upload the file with new code, and we can test it out. It’s best to have patches, but newbies(and windows users) can upload entire modified file. Doing this makes it very easy for us to diff (see your mods) and test your code and we can then provide input.

-brady

cadprofessor wrote on Tuesday, May 11, 2010:

I have no idea how to code…I just thought it would be a nice feature that someone (no me) might want to add a some point.  I just wanted to know how to add this idea to the request features.  Thanks….

bradymiller wrote on Wednesday, May 12, 2010:

hey,
Then feel free to submit this request to the ‘Feature Request’ tracker. I agree it would be a nice feature.
-brady

visolveemr wrote on Wednesday, May 12, 2010:

Hi Michael Jordan ,

We have a patch similar to your requirement.
If no patient is found in search pop up, it has a link “Create New Patient”, which redirects to the new patient creation window.
After creating new patient, you need to make an appointment for patient newly created.
Does it suits your requirement? If so, we will submit our patch in the tracker.

Thanks,
Vicareplus Team,
www.vicareplus.com

bradymiller wrote on Friday, May 14, 2010:

hey,
This sounds useful. If possible, post the patch here so Michael will be notified and can test it out:
https://sourceforge.net/tracker/?func=detail&aid=3000445&group_id=60081&atid=493004
thanks,
-brady

cadprofessor wrote on Friday, May 14, 2010:

Yes,  that sound pretty close to the idea I had.  I would love to see it in action.  Please keep me posted when it is available.  Thank you.

visolveemr wrote on Friday, May 14, 2010:

Hi,

We have posted the patch in the tracker
http://sourceforge.net/tracker/?func=detail&aid=3000445&group_id=60081&atid=493004

Please share your views.

Thanks,
Vicareplus Team
www.vicareplus.com

bradymiller wrote on Friday, May 14, 2010:

hey,

Just tested this in cvs version; would be nice to get into cvs. Couple bugs:

1) Place the entire string ‘Click Here to add the Patient’ into xl() function and into the link (much easier on translators)

2) For some reason the ‘new/search’ screen from the above link does not update the top title bar when hit ‘Create New Patient’ button. Note that the top title bas is updated if use the ‘new’search’ link from the left tree menu.

-brady

cadprofessor wrote on Friday, May 14, 2010:

Brady

Can you let me know when the bugs get worked out.  I would like to try it then.  Thanks

visolveemr wrote on Friday, May 14, 2010:

Hi Michael,

We’ll provide the updated patch in  couple of days.

Thanks
ViCarePlus Team

juggernautsei wrote on Friday, May 14, 2010:

Hi,
I have a couple of clients that would love this mod. Can you post instructions on how to apply the mod?
Thanks

visolveemr wrote on Monday, May 17, 2010:

Hi,

We have posted the updated patch in the tracker
http://sourceforge.net/tracker/?func=detail&aid=3000445&group_id=60081&atid=493004
Please share your views.

Thanks,
Vicareplus Team,
www.vicareplus.com

cadprofessor wrote on Monday, May 17, 2010:

Please understand I do not know much about coding so I have to ask this question.  I downloaded the patch text file and I understand it goes into add_edit_event.php file.  How do I get into the file correctly?  I do not have a clue about installing the patch.  If you have a few moments please explain the steps.  Thanks so much for the help.

Noobie at work….

stephen-smith wrote on Monday, May 17, 2010:

I don’t know MS Windows, but most linux distributions provide a patch program that you can use like (patch -p0 < $the_patch_file).