Hello everyone, I started this topic in 2017. I completed this task and I will report it here. I hope everyone finds it beneficial to everyday, OpenEMR users.
Subject: Enhancement: Added “Add All” Option to Fee Sheet Justify Dropdown
Post:
Hello OpenEMR Community,
I’d like to share a small but useful enhancement I made to the Fee Sheet justify dropdown that I think many practices will find helpful.
The Problem
When justifying ICD codes to CPT codes in the Fee Sheet, you have to click the Justify dropdown and select each ICD code one at a time. For patients with multiple diagnoses, this becomes repetitive and time-consuming — multiplied across every patient, every day.
There was already a “Clear” option to remove all selections at once, but no equivalent option to add them all at once.
The Solution
I added an “Add All” option to the justify dropdown. Clicking it instantly adds all ICD codes from the current encounter to the justification field — the same way “Clear” removes them all at once.
The Change
Only one file was modified:
File: interface/forms/fee_sheet/new.php
Change 1 — Added “Add All” logic inside the setJustify() function (around line 811):
javascript
if (newdiag.length == 0) {
jdisplay = '';
}
else if (newdiag == '__all__') {
jdisplay = diags.join(',');
}
else {
if (jdisplay.length) jdisplay += ',';
jdisplay += newdiag;
}
Change 2 — Added the “Add All” option to the dropdown (around line 833):
javascript
theopts[j++] = new Option('Clear','',false,false);
theopts[j++] = new Option('Add All','__all__',false,false);
Testing
Tested on OpenEMR 7.0.4 running on Ubuntu Linux. Opened a patient encounter with multiple ICD codes, navigated to the Fee Sheet, and confirmed that clicking “Add All” in the justify dropdown correctly populates all ICD codes at once.
Notes
- The change is minimal and isolated to the
setJustify()JavaScript function - It does not affect any other Fee Sheet functionality
- The
'__all__'value is used as a sentinel that cannot conflict with real ICD code values - “Clear” behavior is completely unchanged
I hope this is useful to other practices.
Jeff Guillory NP Health Clinic