Skip to content

Commit

Permalink
Jp port 702_3 (openemr#7840)
Browse files Browse the repository at this point in the history
* no message

* Dialog styles (openemr#7797)

* Dialog styles
Add style to dialog Alert and Confirm

* Add missing portal-theme to custom reports.

* fix following warnings
[06-Nov-2024 10:48:26 America/New_York] PHP Warning:  Undefined array key "HTTP_HOST" in C:\xampp\htdocs\openemr\index.php on line 12
[06-Nov-2024 12:46:07 America/New_York] You must call one of in() or append() methods before iterating over a Finder.

* fix double x out alert in signer_api

* add back fade out

(cherry picked from commit e049bf2)

* Add new actions delete and edit to Office Notes (openemr#7813)

* Add new actions delete and edit to Office Notes
have dates include as time stamps
restyle tables and add modals for delete and edit.

* updated onote service

* fix for test

* add pagnination

* fix url attrs

* needs to be attr

(cherry picked from commit bbaa55f)

* 7.0.2 ports

* Include DOB in referral template. (openemr#7825)

* Include DOB in referral template.

* Format DOB for template display.

(cherry picked from commit c7c1c72)

* New Document Template radio group plug ins (openemr#7837)

add radio groups for stacked and inline

(cherry picked from commit 96230d2)

* faxsms fixes (openemr#7818)

* faxsms fixes
RC setup from services menu wasn't refreshing after save.
ensure phone numbers are formatted
fix RC sendSMS for rest api endpoint

* resize some dialogs

(cherry picked from commit 0eeae03)

* Fix Portal Default Signer
fix anchor syntax
fix audience name in dialog

(cherry picked from commit 7bce85c)

* bump version patch version to 3

---------

Co-authored-by: Chris Ostler <[email protected]>
  • Loading branch information
sjpadgett and ChrisOstler authored Nov 22, 2024
1 parent bd671d1 commit 015732f
Show file tree
Hide file tree
Showing 29 changed files with 468 additions and 275 deletions.
17 changes: 15 additions & 2 deletions controllers/C_Document.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1103,9 +1103,10 @@ public function list_action($patient_id = "")
$treeMenu_listbox = new HTML_TreeMenu_Listbox($menu, array('linkTarget' => '_self'));
$this->assign("tree_html", $treeMenu->toHTML());

$is_new_referer = !empty($_GET['referer_flag']) ? 1 : 0;
$is_new = isset($_GET['patient_name']) ? 1 : false;
$place_hld = isset($_GET['patient_name']) ? filter_input(INPUT_GET, 'patient_name') : xl("Patient search or select.");
$cur_pid = isset($_GET['patient_id']) ? filter_input(INPUT_GET, 'patient_id') : '';
$place_hld = isset($_GET['patient_name']) ? filter_input(INPUT_GET, 'patient_name') : false;
$cur_pid = isset($_GET['patient_id']) ? filter_input(INPUT_GET, 'patient_id') : $patient_id;
$used_msg = xl('Current patient unavailable here. Use Patient Documents');
if ($cur_pid == '00') {
if (!AclMain::aclCheckCore('patients', 'docs', '', ['write', 'addonly'])) {
Expand All @@ -1115,6 +1116,16 @@ public function list_action($patient_id = "")
$cur_pid = '0';
$is_new = 1;
}
if ((int)$cur_pid == 0) {
$place_hld = xl('New Document Uploads.');
}
if (!$place_hld) {
if ((int)$cur_pid > 0) {
$query = "select fname, lname from patient_data WHERE pid = ?";
$name = sqlQuery($query, [$cur_pid]);
$place_hld = $name['fname'] . ' ' . $name['lname'];
}
}
if (!AclMain::aclCheckCore('patients', 'docs')) {
echo (new TwigContainer(null, $GLOBALS['kernel']))->getTwig()->render('core/unauthorized.html.twig', ['pageTitle' => xl("Documents")]);
exit;
Expand All @@ -1124,6 +1135,8 @@ public function list_action($patient_id = "")
$this->assign('cur_pid', $cur_pid);
$this->assign('used_msg', $used_msg);
$this->assign('demo_pid', ($_SESSION['pid'] ?? null));
$this->assign('is_new_referer', $is_new_referer);
$this->assign('new_title', xlt("New Documents"));

return $this->fetch($GLOBALS['template_dir'] . "documents/" . $this->template_mod . "_list.html");
}
Expand Down
6 changes: 4 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
// Set the site ID if required. This must be done before any database
// access is attempted.

$site_id = '';

if (!empty($_GET['site'])) {
$site_id = $_GET['site'];
} elseif (is_dir("sites/" . $_SERVER['HTTP_HOST'] ?? '')) {
$site_id = $_SERVER['HTTP_HOST'] ?? '';
} elseif (is_dir("sites/" . ($_SERVER['HTTP_HOST'] ?? 'default'))) {
$site_id = ($_SERVER['HTTP_HOST'] ?? 'default');
} else {
$site_id = 'default';
}
Expand Down
120 changes: 56 additions & 64 deletions interface/main/onotes/office_comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,75 +23,67 @@
exit;
}

//display all of the notes for the day, as well as others that are active from previous dates, up to a certain number, $N
$N = 10;

//display all the notes for the day, as well as others that are active from previous dates, up to a certain number, $N
$N = 8;
$oNoteService = new ONoteService();
?>

<!DOCTYPE html>
<html>
<head>

<?php Header::setupHeader(); ?>

<title><?php echo xlt('Office Notes'); ?></title>
<?php Header::setupHeader(); ?>
</head>
<body class="body_top">

<div id="officenotes_list">
<a href="office_comments_full.php" onclick='top.restoreSession()'>
<font class="title"><?php echo xlt('Office Notes'); ?></font>
<font class="more"><?php echo text($tmore);?></font></a>

<br />

<table border=0 width=100%>

<?php

$notes = $oNoteService->getNotes(1, 0, ($N + 1));

//retrieve all active notes
if (!empty($notes)) {
$notes_count = 0;//number of notes so far displayed
foreach ($notes as $note) {
if ($notes_count >= $N) {
//we have more active notes to print, but we've reached our display maximum (defined at top of this file)
$notice = '';
$notice .= '<div class="alert alert-info">';
$notice .= ' <a href=\'office_comments_full.php?active=-1\' onclick=\'top.restoreSession()\'>' . xlt("Some office notes were not displayed. Click here to view all.") . '</a>';
$notice .= '</div>';
print $notice;
break;
}

$date = (new DateTime($note['date']))->format('Y-m-d');

$todaysDate = new DateTime();
if ($todaysDate->format('Y-m-d') == $date) {
$date_string = xl("Today") . ", " . oeFormatShortDate($date);
} else {
$date_string = oeFormatShortDate($date);
}

$card = '';
$card .= '<div class="card panel-default">';
$card .= ' <div class="card-heading">';
$card .= ' <h3 class="card-title">' . text($date_string) . ' <strong>(' . text($note['user']) . ')</strong></h3>';
$card .= ' </div>';
$card .= ' <div class="card-body">';
$card .= nl2br(text($note['body']));
$card .= ' </div>';
$card .= '</div>';

print $card;

$notes_count++;
}
}
?>

</table>
</div>

<div id="officenotes_list" class="container">
<div class="row my-3">
<div class="col-12">
<a class="my-3" href="office_comments_full.php" onclick='top.restoreSession()'>
<span class="h2"><?php echo xlt('Office Notes'); ?></span>
<span class="text"><?php echo text($tmore); ?></span>
</a>
</div>
</div>
<table class="table table-hover table-striped">
<?php
$notes = $oNoteService->getNotes(1, 0, ($N + 1));
//retrieve all active notes
if (!empty($notes)) {
$notes_count = 0;//number of notes so far displayed
foreach ($notes as $note) {
if ($notes_count >= $N) {
//we have more active notes to print, but we've reached our display maximum (defined at top of this file)
$notice = '';
$notice .= '<div class="alert alert-info">';
$notice .= ' <a href=\'office_comments_full.php?active=-1\' onclick=\'top.restoreSession()\'>' . xlt("Some office notes were not displayed. Click here to view all.") . '</a>';
$notice .= '</div>';
print $notice;
break;
}

$date = (new DateTime($note['date']))->format('Y-m-d H:i:s');
$todaysDate = new DateTime();
if ($todaysDate->format('Y-m-d') == $date) {
$date_string = xl("Today") . ", " . oeFormatDateTime($date);
} else {
$date_string = oeFormatDateTime($date);
}
$card = '';
$card .= '<div class="card panel-default">';
$card .= ' <div class="card-heading bg-dark text-light">';
$card .= ' <h6 class="card-title m-0 mt-1 pb-1">' . text($date_string) . ' <strong>(' . text($note['user']) . ')</strong></h6>';
$card .= ' </div>';
$card .= ' <div class="card-body p-2">';
$card .= nl2br(text($note['body']));
$card .= ' </div>';
$card .= '</div>';

print $card;

$notes_count++;
}
}
?>
</table>
</div>
</body>
</html>
Loading

0 comments on commit 015732f

Please sign in to comment.