Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/femr/business/services/system/UpdatesService.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public ServiceResponse<List<? extends ILanguageCode>> downloadPackages(String la
List<LanguageCode> optimizedLanguages = getOptimizedLanguages();
for (ILanguageCode optLang : optimizedLanguages) {
System.out.println("Updating " + optLang.getCode() + " and " + langCode);
ProcessBuilder pb = new ProcessBuilder("python",
ProcessBuilder pb = new ProcessBuilder("python3",
"translator/optimizeLanguage.py", langCode, optLang.getCode());
Process p = pb.start();
BufferedReader bfr = new BufferedReader(new InputStreamReader(p.getInputStream(), "UTF-8"));
Expand All @@ -291,7 +291,7 @@ public ServiceResponse<List<? extends ILanguageCode>> initializeLanguages() {
ServiceResponse<List<? extends ILanguageCode>> response = new ServiceResponse<>();
try {
languagesRepository.delete(languagesRepository.findAll(LanguageCode.class));
ProcessBuilder pb = new ProcessBuilder("python", "translator/libargos.py");
ProcessBuilder pb = new ProcessBuilder("python3", "translator/libargos.py");
Process p = pb.start();
BufferedReader bfr = new BufferedReader(new InputStreamReader(p.getInputStream(), "UTF-8"));
String line;
Expand Down
4 changes: 2 additions & 2 deletions app/femr/ui/controllers/BackEndControllerHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class BackEndControllerHelper {

public static void executePythonScript(String absPath) {
try {
ProcessBuilder pb = new ProcessBuilder("python", absPath);
ProcessBuilder pb = new ProcessBuilder("python3", absPath);
pb.start();
} catch (NullPointerException e) {
System.out.println("The python script does not exist or could not be opened.");
Expand All @@ -27,7 +27,7 @@ public static ArrayList<String> executeSpeedTestScript(String absPath) {
if(absPath.equals("/usr/src/speedtest/sptest.py")){
pb = new ProcessBuilder("python3", absPath);
}else{
pb = new ProcessBuilder("python", absPath);
pb = new ProcessBuilder("python3", absPath);
}
Process p = pb.start();
BufferedReader bfr = new BufferedReader(new InputStreamReader(p.getInputStream(), "UTF-8"));
Expand Down
31 changes: 21 additions & 10 deletions app/femr/ui/views/layouts/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,44 @@
search: Html = Html(""),
assets: AssetsFinder)(content: Html)
@import femr.ui.views.html.partials.footer
@import femr.ui.views.html.partials.header
@import femr.ui.views.html.partials.sidebar

<!DOCTYPE html>
<html class="no-js" xmlns="http://www.w3.org/1999/html">
<html class="no-js" lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<title>@title | fEMR</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<link rel="shortcut icon" type="image/png" href="@assets.path("img/logo_color_wordless.png")">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@@400;500;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet">
<link rel="stylesheet" href="@assets.path("css/libraries/jquery.dataTables.min.css")">
<link rel="stylesheet" href="@assets.path("css/libraries/bootstrap.min.css")">
<link rel="stylesheet" href="@assets.path("css/femr.css")"/>
<link rel="stylesheet" href="@assets.path("css/redesign.css")"/>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe mention here in a todo so we remember to remove the femr.css after we are done

@styles
<script type="text/javascript" src="@assets.path("js/libraries/modernizr-2.6.2.min.js")"></script>
</head>
<body>
@header(currentUser, assets)
<body class="femr-shell">
<div class="femr-shell__layout">
@sidebar(currentUser, search, assets)

@outsideContainerTop
<div class="femr-shell__content">
@outsideContainerTop

<div class="container">
@search
<main class="femr-shell__main">
<div class="femr-shell__main-inner">
@content
</div>
</main>

@content

@footer(currentUser, assets)
<div class="femr-shell__footer">
@footer(currentUser, assets)
</div>
</div>
</div>

@outsideContainerBottom
Expand Down
48 changes: 10 additions & 38 deletions app/femr/ui/views/partials/footer.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,18 @@
}
});
</script>
<footer>
<div class="footerSpacer"></div>
<hr/>
<div class="row">
<div class="col-xs-4">
@if(currentUser != null) {
<p>@currentUser.getKitVersion</p> @* We only have access to the version when logged in since currentUser is null if not logged in.*@
}
<footer class="femr-footer">
<div class="femr-footer__content">
<div>
@if(currentUser != null) {
<p class="femr-footer__version">@currentUser.getKitVersion</p>
}
</div>
<div class="col-xs-4">
<div class="leaveFeedback">
<a href="/feedback"> <button type="button" class="fButton fRedButton fOtherButton " id="langCode_feedbackBtn"> Leave Feedback </button></a>
</div>
<div class="femr-footer__actions">
<a href="/feedback" class="femr-btn femr-btn--secondary" id="langCode_feedbackBtn">Leave Feedback</a>
</div>
<div class="col-xs-4">
<p class="text-right footerTextRight" id="langCode_googleChrome">Designed for Google Chrome</p>
<div class="femr-footer__note">
<p id="langCode_googleChrome">Designed for Google Chrome</p>
</div>
</div>
<br/>
</footer>
@*<script>*@
@* document.addEventListener('DOMContentLoaded', function(event) {*@
@* let languageData;*@
@* function translateTextNodes(node) {*@
@* const targetLang = "es";*@
@* if (node.nodeType === Node.TEXT_NODE) {*@
@* const trimmedText = node.nodeValue.trim();*@
@* if (trimmedText !== '' && languageData[targetLang][trimmedText]) {*@
@* node.nodeValue = languageData[targetLang][trimmedText];*@
@* }*@
@* } else {*@
@* node.childNodes.forEach(child => translateTextNodes(child, targetLang));*@
@* }*@
@* }*@

@* fetch('@routes.Assets.versioned("json/languages.json")')*@
@* .then(response => response.json())*@
@* .then(data => {*@
@* languageData = data;*@
@* translateTextNodes(document.body);*@
@* });*@
@* });*@
@*</script>*@
80 changes: 40 additions & 40 deletions app/femr/ui/views/partials/search.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@

@import femr.ui.controllers.routes.SearchController

<div id="searchContainer">
@defining(page.toLowerCase.trim) { pageKey =>
@defining(s"sidebar-search-field-$pageKey") { searchFieldId =>

@page.toLowerCase match {
case "triage" => {
@helper.form(action = SearchController.handleSearch("triage")) {
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
<div id="searchContainer" class="femr-sidebar__search-container">
<label class="femr-sidebar__section-label" for="@searchFieldId">Search Patient</label>
<div class="femr-sidebar__search">
@pageKey match {
case "triage" => {
@helper.form(action = SearchController.handleSearch("triage")) {
<div class="nameOrIdSearchFormWrap">
<input type="text" class="fInput" id="@searchFieldId" placeholder="ID, Name, or Phone #" name="patientSearchQuery" autocomplete="off"/>
<button type="submit" class="nameOrIdSearchButton" aria-label="Search patients"></button>
</div>
}
}
}
case "history" => {
@helper.form(action = SearchController.handleSearch("history")) {
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
case "history" => {
@helper.form(action = SearchController.handleSearch("history")) {
<div class="nameOrIdSearchFormWrap">
<input type="text" class="fInput" id="@searchFieldId" placeholder="ID, Name, or Phone #" name="patientSearchQuery" autocomplete="off"/>
<button type="submit" class="nameOrIdSearchButton" aria-label="Search patients"></button>
</div>
}
}
}
case "medical" => {
@helper.form(action = SearchController.handleSearch("medical")) {
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
case "medical" => {
@helper.form(action = SearchController.handleSearch("medical")) {
<div class="nameOrIdSearchFormWrap">
<input type="text" class="fInput" id="@searchFieldId" placeholder="ID, Name, or Phone #" name="patientSearchQuery" autocomplete="off"/>
<button type="submit" class="nameOrIdSearchButton" aria-label="Search patients"></button>
</div>
}
}
}
case "pharmacy" => {
@helper.form(action = SearchController.handleSearch("pharmacy")) {
<div class="nameOrIdSearchFormWrap">
<label for="nameOrIdSearchForm"></label>
<input type="text" class="fInput" id = "nameOrIdSearchForm" placeholder="ID, Name, or Phone #" name="patientSearchQuery"/>
<button type="submit" id="searchBtn" class="fButton fRedButton fGlobalSearchButton nameOrIdSearchButton">Search</button>
</div>
case "pharmacy" => {
@helper.form(action = SearchController.handleSearch("pharmacy")) {
<div class="nameOrIdSearchFormWrap">
<input type="text" class="fInput" id="@searchFieldId" placeholder="ID, Name, or Phone #" name="patientSearchQuery" autocomplete="off"/>
<button type="submit" class="nameOrIdSearchButton" aria-label="Search patients"></button>
</div>
}
}
}
case _ => {
case _ => {

}
}
}
@* Medical also needs an exception. so does pharmacy. History controller should only be
for duplicate patients. How to structure this?!*@

</div>
</div>

</div>
}
}
Loading
Loading