Skip to content

Latest commit

 

History

History
executable file
·
200 lines (180 loc) · 12.2 KB

README.md

File metadata and controls

executable file
·
200 lines (180 loc) · 12.2 KB

BHT - Core Application

Index

  1. Description
  2. Folder Structure
  3. Core Application Setup
  4. Modules
  5. Debugging

Description

The BHT core application is designed to be the heart of the BHT 3-tier architecture with it being the logical control structure for all other applications that will run under it.

The application is built using

1. HTML for markup
2. CSS for styling
3. Javascript for logic 

Folder Structure

.
├── apps
│   ├── anc
│   ├── ANC
│   │   ├── application.json
│   │   ├── assets
│   │   │   └── images
│   │   │       └── pregnant.png
│   │   └── pregnant.png
│   └── ARTa
│       ├── application.json
│       ├── assets
│       │   ├── css
│       │   │   └── touch-fancy.css
│       │   ├── images
│       │   │   └── aids.png
│       │   └── js
│       │       ├── dateselector.js
│       │       └── multi_column_controls.js
│       └── index.html
├── assets
│   ├── css
│   │   ├── application.css
│   │   ├── bootstrap
│   │   │   └── bootstrap.min.css
│   │   ├── custom.css
│   │   ├── datatables
│   │   │   ├── dataTables.uikit.min.css
│   │   │   ├── fixedHeader.dataTables.min.css
│   │   │   ├── jquery.dataTables.min.css
│   │   │   ├── scroller.dataTables.min.css
│   │   │   └── uikit.min.css
│   │   ├── dispensing.css
│   │   ├── maindashboard
│   │   │   ├── footer.css
│   │   │   └── header.css
│   │   ├── patientdashboard.css
│   │   ├── prescription.css
│   │   ├── vitals-keypad.css
│   │   └── yes_no_ctrls.css
│   ├── docs
│   ├── images
│   │   ├── aids.png
│   │   ├── BaobabHealth.png
│   │   ├── barcode.png
│   │   ├── delete.png
│   │   ├── diabetes.png
│   │   ├── down-arrow.svg
│   │   ├── female32x32.png
│   │   ├── female48x48.png
│   │   ├── female.gif
│   │   ├── launcher.png
│   │   ├── male16x24.png
│   │   ├── male24x32.png
│   │   ├── male.gif
│   │   ├── no_image.png
│   │   ├── opd.png
│   │   ├── Person_Undefined_Female_Dark.png
│   │   ├── Person_Undefined_Male_Dark.png
│   │   ├── prescription
│   │   │   ├── dosage.png
│   │   │   ├── evening.png
│   │   │   ├── history.png
│   │   │   ├── medication.png
│   │   │   ├── morning.png
│   │   │   ├── noon.png
│   │   │   ├── period.png
│   │   │   ├── prescription.png
│   │   │   └── rx.png
│   │   ├── up-arrow.svg
│   │   ├── vitals
│   │   │   ├── bp.png
│   │   │   ├── height.png
│   │   │   ├── pulse-rate.png
│   │   │   ├── spo2.png
│   │   │   ├── temp.png
│   │   │   └── weight.png
│   │   └── woman32x32.png
│   └── js
│       ├── application.js
│       ├── birthdate_functions.js
│       ├── bootstrap
│       │   └── bootstrap.min.js
│       ├── client-scan-barcode.js
│       ├── core.js
│       ├── data.js
│       ├── datatables
│       │   ├── dataTables.fixedHeader.min.js
│       │   ├── jquery-1.12.4.js
│       │   └── jquery.dataTables.min.js
│       ├── dispensing.js
│       ├── generic_ajaxrequest.js
│       ├── jquery.min.js
│       ├── moment.js
│       ├── post_parameters.js
│       ├── prescription.js
│       ├── submitparameters.js
│       ├── vitals-keypad.js
│       └── yes_no_ctrls.js
├───config
│   ├── administration.json.example
│   ├── application.json.example
│   ├── config.json
│   └── config.json.example
├───Public
│   ├── touchscreentoolkit
├── public
│   ├── application.json.example
└── views
    ├── location.html
    ├── login.html
    ├── patient
    │   ├── dispensing.html
    │   ├── new.html
    │   ├── patient_program.html
    │   ├── prescription.html
    │   ├── search.html
    │   ├── search_results.html
    │   └── vitals.html
    ├── patient_dashboard.html
    └── users
        ├── change_password.html
        ├── change_role.html
        ├── edit_user.html
        ├── new.html
        ├── show.html
        └── view_users.html

Core Application Setup

Pre Requisites

* Clone the Backend API application from the [Repository](https://github.com/BaobabHealthTrust/BHT-EMR-API)
* The backend EMR API running 
* A server environment e.g PHP, NGINX, node
* Text editor for edditing of JSON files 
* Keyboard available for in browser debugging

Set up process

1. Clone the application from github at the [Repository](https://github.com/BaobabHealthTrust/BHT-Core) 
    *NOTE if the repository page gives you a 404 error make sure you have been added to the repository page by the admins

2. Chang directories into the /apps/config folder 

3. copy the config.json.example file and rename it to config.json

4. input where the IP address of where the backend EMR API is running
    * NOTE Use the actual IP address of the machine e.g. 192.168.0.0 instead of localhost or 0.0.0.0 as the application is a client side applciation and not being served directly from the server. 

5. Input the port on which the application is running

6. Input the protocol scheme in which the application e.g. HTTP or HTTPS in the event that it does run on the internet and needs and encrypted connection at all times. 

7. At this point the application is ready to run. This can be achieved by using any http server available at the time. 

Modules

By default the application comes with 2 folders in the apps folder namely the apps folder and the config folder. these 2 folders contain generic functionality such as user management and patient registration. To add extra functionality, new core modules are to be introduced into the apps/ folder. For the applciation to know the a new application is available and to add it to the application go through the application set up process documented below.

Module - Application Setup

1. Clone the repository from github into the apps/ folder. 
    *links for all available applications will be added 
2. Change directory to the apps/config/ folder and open the config.json file you were editing earlier
3. in the apps hash, add a new entry with the following.
    * applicationName
    * applicationFolder
    * applicationIcon
    * applicationDescription
        examples are available in the config.json.example file
4. Copy the applciation.json.example from the /public/ folder and paste it in the core application folder. 
5. rename the application.json.example to application.json and fill in the required fields 
6. The module is now ready to be run, it will be available by going to the home page after logging in or after clicking the applications button in the bottom right hand of the page. 

Debugging

If the application is running abnormally, check the console by going to inspect in the console or by pressing ctrl+shift+i which achieves the same purpose.

The console is where all the errors will be logged. Most errors encountered so far have to do with the fact that the backend EMR API is not set up properly or is not running, the link is not properly defined in the config.json. please verify the configurations if any of these appear.