GAD-7, PHQ-9 or EFS forms to share?

Hi Mark, thank you very much for your api based PHQ9 form. I tried it out over the weekend and found a bug on line 95 of the file phq9_javasrc.js which affects displaying the total and question 10 in the form. you may well have found it yourself by now.
phq9_javasrc.js (6.5 KB)

also a bug which was in my original code, it has no adverse affect other than to generate a php error in the logs - in the files new.php and view.php the string $string_form_title should be $str_form_title as declared in phq9.inc.php

we would like to use your form in our live system so would like to know itā€™s current status, weā€™d like to see it incorporated in release versions of OpenEMR

best wishes, ruth

Hello there, Ruth!
I have tweaked a few things and knew about the bug regarding the display of the total in the worksheet when entering data, but never got around to fixing it. I fixed the files you noted, and have included them in the attached zip file with the most recent changes.
I am happy to contribute in any way I can to the project.
I am very impressed with the project and it is essential to my solo practice.

Best!
Mark

phq9_form.zip (11.0 KB)

1 Like

hi mark,
thanks, that looks great - the phq-9 form is working well. Iā€™ve found a tiny glitch in the formatting, meaning that a couple of questions did not have a space after them. Itā€™s fixed in the attached two files: view.php - the lines and are added in as lines 101,102; new.php - the lines are moved by deleting 97,98 and then adding in and as lines 98,99
view.php (11.6 KB)
new.php (9.4 KB)

then in file phq9.inc.php i spotted a typo on line 31 - questionnaire has two ns not two rs :slight_smile:
phq9.inc.php (1.3 KB)

I think the next thing is for you to submit it to the dev team for inclusion in OpenEMR releases!!

the project is impressive indeed, and iā€™ve only explored tiny corners of it that are useful for my friendā€™s work in Dublin. Whereabouts are you?
all the best, ruth

Thank you so much for fixing those files. I will contact the head honchos on the forum about the inclusion of the form.
I am located in Rochester, NY, USA. I am a family physician in a private solo practice and have always wanted to manage my own IT. So, when I started my practice in June 2021, I purchased, installed, and configured my firewall, network, wifi, server, and phone system and wanted to use as much open source software as possible. My server running openEMR is Ubuntu and most of the workstations and laptops are Linux based.
I have been practicing for over 25 yrs and wanted to apply my tech skills to make my practice run as effectively as possible. So far so good!

Hi Mark,

is there any help we can give on submitting the PHQ-9 form for inclusion in OpenEMR distributions? - we managed to figure it out for gad7.
It involves using git to manage the files, getting an account on github, forking the OpenEMR master and then doing a ā€˜Pull Requestā€™ to get the code accepted.

there is some documentation about how to contribute code at:
apologies if youā€™ve already discovered this! youā€™re story is impressive!. Iā€™m a software engineer, now retired (and adult maths teacher). I use Linux (OpenSUSE) and am also very keen to use open source software where possible. A friend who is a senior nurse in Dublin, Ireland, asked me to help with her project to use OpenEMR - Pete Boyd got her implementation up and running and manages her system, and does development, and iā€™ve just come in to help a little with developing the functionality. with best wishes ruth

1 Like

Ruth,
I have created a github account and uploaded the files for the form to the following directory:
https://github.com/msarnov/openemr-phq9

I have forked the main project to my github account.

Soā€¦ should I edit the code for PHQ9 in the appropriate directory of my forked copy of openEMR or in my openemr-phq9 directory?

I have done other modifications to OpenEMR on my system. Should I include them on my github account as a backup?

Thank you for the assistance, as I would like this code contributed to the project.

1 Like

@Mark_Sarnov @ruth
Iā€™ve pulled this into my dev branch and am testing. Noted some small issues thus far that Iā€™ll clean up then create a PR for you guys.

1 Like

Thank you for the assist. I am very new to code submission for larger projects. I am used to tweaking for my own purposes.

Hi Mark. Iā€™m away for the weekend - can I get back to you on Tuesday- sounds like youā€™re progressing well ā€¦
Ruth

hi mark and jerry,

thanks both for progressing this and helping with the PR and small issues. Iā€™ve only just got back from an overseas trip so not really in thinking mode yet, but will be back at my desk properly tomorrow,

ruth

@Mark_Sarnov @ruth
I refactored and relayed out this form. Super old form! Anyway attached is new zip of form for you to test and hopefully submit in a PR.

phq9.zip (21.6 KB)

Hi @mark_sarnov and @sjpadgett

I just quickly tested your refactored version Jerry, and as far as i can see it works well - there are a couple of formatting differences but iā€™ll leave that for mark to comment on.

thanks
ruth

Looks pretty good to me.
Will work on:

  1. the line ā€œOver the past 2 weeksā€¦ā€ in a larger font.
  2. Have the questions numbered.
  3. A blank line between the 9th question and the ā€œDifficultyā€¦ā€ question and the question itself with a slightly larger font, and perhaps bold.

But they are only quibbles. Iā€™ll work on it this weekend and post on this thread when the github files are updated.

Thank you!

hi @Mark_Sarnov and Jerry (@sjpadgett ),
pete has noticed a slight problem with the latest version of the phq9 form - the file info.txt has become a single line ā€˜PHQ-9 Clinicalā€™ instead of two lines ā€˜PHQ-9ā€™/ ā€˜Clinicalā€™ - this has the confusing effect of giving the form the name ā€˜PHQ-9 Clinicalā€™ in the form admin page and in the drop down menus where it is chosen for a patient, instead of ā€˜PHQ-9ā€™ and also putting it in the ā€˜miscellaneousā€™ drop down menu instead of ā€˜Clinicalā€™ by default (although this can be changed of course, on the admin page)

the first line of info.txt gives the name of the form, the second which menu it should go in by default

Iā€™m sure itā€™s just a slip of the keyboard, and as it uses the same db records everything seems to work ok except for the confusion in the menus and admin page. Iā€™ve attached what I believe to be the correct version of info.txt
info.txt (16 Bytes)

best wishes, ruth

I actually did not know that!
Anyway someone needs to put up a PR for it and Iā€™ll get it into core.

are you happy to do the PR @Mark_Sarnov ? I think you had a couple of other changes you were making, so it could all be 'PRā€™d at the same time?
Ruth

Mark didnā€™t like that I reduced the size of the top question. Also I forgot to add line numbers but I got distracted with CQM and turn back to you guys.

Iā€™d make these changes and do the PR but I really donā€™t want to own it.

no thatā€™s fine Jerry, youā€™ve plenty on your plate and i think we should take it back, iā€™m happy to work with mark on the code and git related things. thanks for your help so far.

ruth

1 Like

Hi @Mark_Sarnov

i hope you donā€™t mind my reply to jerry earlier, dropping us in it to take back doing mods and submitting PRs. Iā€™m happy to help with this - both coding and using git and PRs - would you like to let me know where youā€™re at and how i can help?

all the best
ruth

Hi Ruth!
Heck no! I consider you a co-contributor, as your GAD7 was the inspiration for the PHQ9. Let me give you access to my GitHub PHQ9 directory, and you can edit whatever you wish to work on! I have been crazy busy as COVID-19 is raging in Rochester, so my days have been pretty full.
Soā€¦ No worries!