@tony , @pri2si17, @teryhill, @aethelwulffe Here ,the thread for discussions on my project: Improvement of the setup for LibreHealth EHR.
Rooms are open for all sorts of ideas
- Student @mua_rachmann
@tony , @pri2si17, @teryhill, @aethelwulffe Here ,the thread for discussions on my project: Improvement of the setup for LibreHealth EHR.
Rooms are open for all sorts of ideas
Can you list the major points of your project here? It will be easier for us older folks to follow.
+1 to not using Google Docs.
@muarachmann if you want, you can make the top post in this topic a “wiki” post" (use the post options menu) so you can add all of your content from the google doc here.
@teryhill , @tony , @pri2si17, @aethelwulffe Here is the rundown of my project and the major points my project will address
In summary this is all about improving the setup for LibreHealth. This procedure will entail
Creating and Designing a new UI for the setup procedure
Offer a two way flow of the setup (using next and previous buttons).
Correct versioning of the system until the extension for php 7.1 is totally merged (which is avoided for now) but i see this could be included.
Upgrade server system’s dependencies if not optimal for the LibreHealth EHR environment.
Initialization of important parameters such as email , clinic name , default theme , etc upon a successful install.
A rapid walkdown tutorial on basic things the software does (in the form of images/sliders) of course there will be a skip button if the user wants to ignore this
This project is primarily aimed not only at producing an eye catching setup but at producing a setup environment that is optimal for LibreHealth EHR.
@muarachmann I like the breakdown, but I would suggest one thing to you. IMO, you should first focus on functionality, regardless of UI (an okay UI will work in initial stages). Once you have rigorously tested your functionality, then work on UI. I think if we have a fully functional code, that can be adapted to UI later on.
Also I would like if you develop this as a standalone module. Opinion of @teryhill @aethelwulffe and @tony are much appreciated.
Yeah! @pri2si17, the implementation will be done as a separate module found in the modules/setup dir as suggested by @aethelwulffe earlier.
@muarachmann - looks good to me. The core functions of the setup should have the ability to be run from an command line script. Then add UI. The current core is the Installer.class.php
There is an example in OpenEMR that might be useful to look at (not use, just get an idea or two)
@pri2si17, @tony, @teryhill the coding phase has begun and here is what i have started and plan to do.
Created a modules/setup directory (still doubting if i should put the installer class i am about to write here or leave it in the library folders)
I plan on creating a wizard class that will take care of the pages for the setup flow
Plan on using composer for dependency management.
Let me know your thoughts please
Yeah that’s the case it will be completely independent.
Composer is good with me, we need to make sure that how it’s used is well documented. We use it a lot (in my company) for customized versions of the EHR, where the “base” release is a dependency of the custom repo… etc.
Here is the link to my blog.You can read about my journey into gsoc2018 also https://medium.com/@mualaurent
Implementation of my project proposal is ongoing and can be found here.
All ideas are welcomed. Lets make this a success
Ajax call for datbase creation in LibreHealth setup
$('#dbForm').submit(function(e){
e.preventDefault();
// show loader
$(".center-div").removeClass('hidden');
$(".loading").removeClass('hidden');
// variables to hold all form parameters such as login name, password , iuname etc
var localhost = $("#server").val(); var port = $("#port").val();
var dbname = $("#dbname").val(); var pass = $("#pass").val();
var rootpass = $("#rootpass").val(); var loginhost = $("#loginhost").val();
var login = $("#login").val(); var root = $("#root").val();
var collate = $("#collate").val(); var iuser = $("#iuser").val();
var iuserpass = $("#iuserpass").val(); var iufname = $("#iufname").val();
var iuname = $("#iuname").val(); var igroup = $("#igroup").val();
var data = {
localhost : localhost,
dbname : dbname,
rootpass : rootpass,
login : login,
collate : collate,
iuserpass : iuserpass,
iuname : iuname,
port : port,
pass : pass,
loginhost : loginhost,
root : root,
iuser : iuser,
iufname : iufname,
igroup : igroup
};
$.ajax({
url : "database.php",
type:'POST',
data: data,
success : function (response) {
alert(response);
$(".center-div").addClass('hidden');
$(".loading").addClass('hidden');
},
error: function (error) {
$(".center-div").addClass('hidden');
$(".loading").addClass('hidden');
alert(error);
}
});
});
This can be found in the LIbreEHR/modules/setup/libs/js/setup.js file
Bash Scripting also possible in LibreHealth EHR
On my journey in implementing my GSoC project i am faced with a situation to install dependencies the setup module will be requiring in order for it to run smoothly.
A shell script is optimal for this.
First we should know what is a "Shell". It is nothing but an interface between the user and the services of an operating systems such as UNIX, LINUX, Mac or WINDOWS (to some extent).
The interface can be through command line (CLI) or in a graphical manner (GUI). There are several shells such as sh (Bourne Shell) ksh (Korn Shell), csh (‘C’ Shell) etc. A script written in such an environment is called a “Shell Script”.
Generally scripts can be used to achieve several tasks. Listed only a few:
There are so many reasons we want to have our own shell scripts written. For our purpose , we write a script that will automate the process of manually downloading the dependencies necessary for libreEHR. this script has as primary function to get all dependencies necessary for the effective and efficient running of LibreEHR. While it focuses mostly on the LINUX/UNIX and MACOS platforms this script must be ran as a privilege user no other than the root cause no one will want to allow installation from a third party software is some level of permission access is not granted The few lines of code put up is what i have done so for now concentrates on the debian distro more to come folks
#! /bin/bash
if [[ "$EUID" = 0 ]]; then
echo "(1) already root"
else
zenity --question --width=350 --height=100 --text="Do you want to install this package?" --title="LibrehealthEHR Upgrade" 2> /dev/null
test=$?
echo $test
ans=$(zenity --title="LibrehealthEHR Upgrade" --list --width=600 --height=300 --text "The following packages will be installed (you can decide to uncheck ones already installed.)" --checklist --column "Pick" --column "options" TRUE "php7.0-curl" TRUE "php7.0-xml" FALSE "php7.0-soap" FALSE "php7.0-mbstring" --separator=":" 2> /dev/null);'
echo $ans
sudo -k # make sure to ask for password on next sudo
if sudo true; then
echo "(2) correct password"
sudo apt-get install php7.0-curl;
sudo apt-get install php7.0-xml;
sudo apt-get install php7.0-mbstring;
else
echo " wrong password more than (3) attempts"
exit 1 fi fi
Hi @muarachmann
I think this is good, that you execute script in background, but do have some option for windows as they don’t execute bash
Yes have a walk down tuto thats the best i can do except you have some ideas. Plan on some carousel for wampp/xampp download and how to configure their php i think a 1-5 slide show will do or some clean descriptive video/gif but i go for the carousel with clean images. Probably @apooravc will help here since he’s on windows just to give us his experience