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.
Twig Portal Refactor from master openemr#4684 (openemr#4687)
- Loading branch information
Showing
15 changed files
with
1,327 additions
and
786 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
/** | ||
* | ||
* Copyright (C) 2016-2019 Jerry Padgett <[email protected]> | ||
* Copyright (C) 2016-2021 Jerry Padgett <[email protected]> | ||
* Copyright (C) 2020 Tyler Wrenn <[email protected]> | ||
* | ||
* LICENSE: This program is free software; you can redistribute it and/or | ||
|
@@ -34,7 +34,6 @@ | |
require_once("./../library/patient.inc"); | ||
|
||
require_once("./lib/appsql.class.php"); | ||
require_once("./lib/section_fetch.class.php"); | ||
|
||
$appsql = new ApplicationTable(); | ||
$pending = $appsql->getPortalAudit($pid, 'review'); | ||
|
@@ -125,8 +124,24 @@ | |
echo "<div class='card'>"; | ||
echo "<header class='card-header border border-bottom-0 immunizations'>" . xlt('Patient Immunization') . '</header>'; | ||
echo "<div class='card-body border'>"; | ||
$result = FetchSection::getImmunizations($pid); | ||
|
||
$query = "SELECT im.*, cd.code_text, DATE(administered_date) AS administered_date, | ||
DATE_FORMAT(administered_date,'%m/%d/%Y') AS administered_formatted, lo.title as route_of_administration, | ||
u.title, u.fname, u.mname, u.lname, u.npi, u.street, u.streetb, u.city, u.state, u.zip, u.phonew1, | ||
f.name, f.phone, lo.notes as route_code | ||
FROM immunizations AS im | ||
LEFT JOIN codes AS cd ON cd.code = im.cvx_code | ||
JOIN code_types AS ctype ON ctype.ct_key = 'CVX' AND ctype.ct_id=cd.code_type | ||
LEFT JOIN list_options AS lo ON lo.list_id = 'drug_route' AND lo.option_id = im.route | ||
LEFT JOIN users AS u ON u.id = im.administered_by_id | ||
LEFT JOIN facility AS f ON f.id = u.facility_id | ||
WHERE im.patient_id=?"; | ||
$result = $appsql->zQuery($query, array($pid)); | ||
$records = array(); | ||
foreach ($result as $row) { | ||
$records[] = $row; | ||
} | ||
foreach ($records as $row) { | ||
echo text($row['administered_formatted']) . ' : '; | ||
echo text($row['code_text']) . ' : '; | ||
echo text($row['note']) . ' : '; | ||
|
Oops, something went wrong.