forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openemr#7244 from sjpadgett/702_cherries
Master to 702 patch 2 Cherry Picks
- Loading branch information
Showing
101 changed files
with
5,301 additions
and
1,241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
* @package OpenEMR | ||
* @link https://www.open-emr.org | ||
* @author Brady Miller <[email protected]> | ||
* @author Jerry Padgett <[email protected]> | ||
* @copyright Copyright (c) 2019 Brady Miller <[email protected]> | ||
* @copyright Copyright (c) 2019-2024 Jerry Padgett <[email protected]> | ||
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 | ||
*/ | ||
|
||
|
@@ -18,6 +20,7 @@ | |
use OpenEMR\Common\Csrf\CsrfUtils; | ||
use OpenEMR\Common\Logging\SystemLogger; | ||
use OpenEMR\Common\Twig\TwigContainer; | ||
use OpenEMR\Services\DocumentTemplates\DocumentTemplateService; | ||
use OpenEMR\Services\FacilityService; | ||
use OpenEMR\Services\PatientService; | ||
use OpenEMR\Events\PatientDocuments\PatientDocumentTreeViewFilterEvent; | ||
|
@@ -35,6 +38,7 @@ class C_Document extends Controller | |
private $Document; | ||
private $cryptoGen; | ||
private bool $skip_acl_check = false; | ||
private DocumentTemplateService $templateService; | ||
|
||
public function __construct($template_mod = "general") | ||
{ | ||
|
@@ -66,6 +70,7 @@ public function __construct($template_mod = "general") | |
|
||
// Create a crypto object that will be used for for encryption/decryption | ||
$this->cryptoGen = new CryptoGen(); | ||
$this->templateService = new DocumentTemplateService(); | ||
} | ||
|
||
public function upload_action($patient_id, $category_id) | ||
|
@@ -100,31 +105,9 @@ public function upload_action($patient_id, $category_id) | |
} | ||
$this->assign("TEMPLATES_LIST", $templates_options); | ||
|
||
// duplicate template list for new template form editor sjp 05/20/2019 | ||
// will call as module or individual template. | ||
$templatedir = $GLOBALS['OE_SITE_DIR'] . '/documents/onsite_portal_documents/templates'; | ||
$templates_options = "<option value=''>-- " . xlt('Open Forms Module') . " --</option>"; | ||
if (file_exists($templatedir)) { | ||
$dh = opendir($templatedir); | ||
} | ||
if ($dh) { | ||
$templateslist = array(); | ||
while (false !== ($sfname = readdir($dh))) { | ||
if (substr($sfname, 0, 1) == '.') { | ||
continue; | ||
} | ||
if (substr(strtolower($sfname), strlen($sfname) - 4) == '.tpl') { | ||
$templateslist[$sfname] = $sfname; | ||
} | ||
} | ||
closedir($dh); | ||
ksort($templateslist); | ||
foreach ($templateslist as $sfname) { | ||
$optname = str_replace('_', ' ', basename($sfname, ".tpl")); | ||
$templates_options .= "<option value='" . attr($sfname) . "'>" . text($optname) . "</option>"; | ||
} | ||
} | ||
$this->assign("TEMPLATES_LIST_PATIENT", $templates_options); | ||
$templates_list = $this->templateService->renderPortalTemplateMenu($patient_id, '-patient-', false) ?? []; | ||
$this->assign("TEMPLATES_LIST_PATIENT", $templates_list); | ||
|
||
$activity = $this->fetch($GLOBALS['template_dir'] . "documents/" . $this->template_mod . "_upload.html"); | ||
$this->assign("activity", $activity); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.