Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
731f88f
adding user manual
kgatman May 13, 2020
a2c81d0
adding lots of content
kgatman May 13, 2020
b8e2b81
site generation docs
kgatman May 13, 2020
de83b1a
minor modifications
kgatman May 13, 2020
1d5ab8f
adding scripts
kgatman May 19, 2020
9db84e1
add automated deployment content
kgatman May 19, 2020
39e5492
generated files
kgatman May 19, 2020
0888909
pointing to the right location for scripts
kgatman May 19, 2020
22d3c09
generated files now pointing to the right location
kgatman May 19, 2020
041199a
addint patient identifer script
kgatman May 20, 2020
01dfa9f
minor changes
kgatman May 20, 2020
51cae70
minor changes | site generated files
kgatman May 20, 2020
5e952bf
cronjon 2 mins
kgatman May 20, 2020
173cba4
2 mins | generated files
kgatman May 20, 2020
a7f0b2b
fixing autodeployment guide
kgatman May 27, 2020
c7da170
adding video
kgatman May 27, 2020
5ed898b
site docs for mk
kgatman May 27, 2020
c836c8d
minor cosmetics
kgatman May 27, 2020
a110212
site generated docs for mkdocs
kgatman May 27, 2020
6179978
adding more content for clarity
kgatman Jun 2, 2020
795c2e7
site generated docs | adding more content for clarity
kgatman Jun 2, 2020
8981f8b
changed slight formating
kgatman Jun 2, 2020
a50b894
changed slight formating | site docs
kgatman Jun 2, 2020
dc69cab
Adding separate Informed Push tab
kgatman Jun 21, 2020
6c85551
Site generated docs | Informed Push
kgatman Jun 21, 2020
559ab4a
fixing broken links
kgatman Jul 6, 2020
eeace95
Fixing broken links: gh-generated html
kgatman Jul 6, 2020
1e724c3
Adding COVID19 docs
kgatman Jul 13, 2020
ad4cbbd
Generated HTML n CSS: adding COVID-19 docs
kgatman Jul 13, 2020
699b401
hardcoded _blank target to open in another tab....if it'll work :)
kgatman Jul 13, 2020
afef11c
fixing minor formating
kgatman Jul 13, 2020
1722338
hardcoding blank target
kgatman Jul 13, 2020
5bc0988
adding system url on the manual
kgatman Jul 13, 2020
78fed4a
generated HTML: adding system url
kgatman Jul 13, 2020
ee531aa
adding more content to the tree
kgatman Jul 19, 2020
195caf6
adding more pages
kgatman Jul 19, 2020
2ad9cf1
generated HTML
kgatman Jul 20, 2020
9d3ee2f
adding content for docker training instance
kgatman Jul 21, 2020
132686e
adding content for docker training instance | generated HTML
kgatman Jul 21, 2020
096f408
addded docker guide
kgatman Jul 22, 2020
96b0e14
enablind extensions
kgatman Jul 22, 2020
c295b37
i just changed the index page
kgatman Jul 27, 2020
09ba299
Automated deployment for mappings and serialized object
Leqela Aug 10, 2020
a73a819
added mapping scripts
kgatman Aug 10, 2020
0ab423b
formatted MappingsScripts
kgatman Aug 10, 2020
0bf704e
Worked on formating documentation to make it more clearer
Leqela Aug 10, 2020
2cbba16
Merge branch 'master' of https://github.com/eRegister/docs
Leqela Aug 10, 2020
ac859d5
Formating Documantation
Leqela Aug 10, 2020
22b56d7
changing folder name
kgatman Aug 10, 2020
ec8037e
changed folder name
kgatman Aug 10, 2020
6c26050
Merge branch 'master' of https://github.com/eRegister/docs
kgatman Aug 10, 2020
52468f3
changed folder name
kgatman Aug 10, 2020
0d0747f
changed folder name
kgatman Aug 10, 2020
054bbc7
changed a few formatings
kgatman Aug 10, 2020
41b606a
demo day
kgatman Nov 5, 2020
7106bc3
generated HTML
kgatman Nov 5, 2020
6034dbd
let's see
kgatman Nov 5, 2020
8956efa
deleted About us page
kgatman Nov 5, 2020
3b739f8
html: deleted about us page
kgatman Nov 5, 2020
3051f73
demo 1
likeleliletsie Nov 20, 2020
ae6af1d
demo2
likeleliletsie Nov 20, 2020
4f1603a
recreating layout attempt 1
kgatman Dec 7, 2020
335466d
recreating layout attempt 1 [HTML]
kgatman Dec 7, 2020
daac84f
creating a separate service to pull concepts
kgatman Feb 9, 2021
3eda94f
created a separate file to deal with pulling drup concepts
kgatman Feb 9, 2021
abfb475
added bahmniapps related scripts
kgatman Feb 9, 2021
33b8cbc
adding release log file
kgatman Feb 24, 2021
93cb4bc
adding release log file
kgatman Feb 24, 2021
d6a971e
html files: adding release log file
kgatman Feb 24, 2021
12959cd
fixing deprecated tabs
kgatman Feb 24, 2021
8574dea
minor changes
kgatman Feb 24, 2021
6e64597
rearranging automated deployment
kgatman Mar 1, 2021
c482392
rearranging automated deployment
kgatman Mar 1, 2021
3b5a821
rearranging automated deployment
kgatman Mar 1, 2021
5c7f49f
reaaranging automated deployment
kgatman Mar 1, 2021
4a2f994
rearranging automated deployment
kgatman Mar 1, 2021
7e68add
reaaranging automated deployment
kgatman Mar 1, 2021
f5591f6
Integration
likeleliletsie Mar 31, 2021
f2c3336
Generated html
likeleliletsie Mar 31, 2021
78fdc01
IntegrationDHIS1
likeleliletsie Mar 31, 2021
a0b29f6
Changes1
likeleliletsie Mar 31, 2021
e607a44
Changes2
likeleliletsie Mar 31, 2021
5b5a905
Demo2
likeleliletsie Apr 7, 2021
89626be
change
likeleliletsie Apr 7, 2021
3495d9a
Odoo1
likeleliletsie Apr 27, 2021
784fab1
Odoochange
likeleliletsie Apr 27, 2021
ee9be28
Merge branch 'master' of https://github.com/eRegister/docs helek
kgatman Apr 28, 2021
f95036b
fixed a few things
kgatman Apr 28, 2021
f16f12d
adding content for upgrading to Bahmni 0.92
kgatman May 18, 2021
0be6c9a
adding content for upgrading Bahmni to 0.92
kgatman May 18, 2021
269bea5
adding minor changed to DHIS2 manual
kgatman Oct 13, 2021
c0899e0
let's what will happen
kgatman Oct 13, 2021
bf868e5
adding new article
kgatman Nov 17, 2021
5d99ddd
adding pics
kgatman Nov 17, 2021
e2c6c1a
adding clinical search article
kgatman Nov 17, 2021
59d2252
adding generated code
kgatman Nov 17, 2021
bb64d13
html generated
kgatman Nov 22, 2021
23f6177
generated html
kgatman Nov 22, 2021
50a0f5c
removed reduntant line
kgatman Nov 22, 2021
8402746
generated html
kgatman Nov 22, 2021
e88052e
adding changes for July 2022
kgatman Jul 25, 2022
cb56278
adding changes for July 2022
kgatman Jul 25, 2022
9b24b96
July Mod 1
MohauNkepane Jul 26, 2022
ae8c5bd
Trying things out
MohauNkepane Jul 26, 2022
90baf33
Merge pull request #6 from eRegister/July
MohauNkepane Jul 26, 2022
4a50e00
Merge branch 'master' of https://github.com/eRegister/docs
MohauNkepane Jul 26, 2022
0cd1601
strengthening TB tools
kgatman Aug 12, 2022
f0ebf16
strengthening TB tools
kgatman Aug 12, 2022
a60a928
re-added release notes
MohauNkepane Aug 12, 2022
7da5750
Merge branch 'master' of https://github.com/eRegister/docs
kgatman Aug 12, 2022
31a9a82
updated flow diagram and added more content
kgatman Sep 7, 2022
bf9cb34
addde one more dataset
kgatman Sep 7, 2022
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
98 changes: 98 additions & 0 deletions DeployingMappings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Mappings and Serialized Object auto Deployment

!!! warning
* First start with your local instance before attempting to update the live server.
* When configuring the live server, please make sure that **no one** is using the system when doing Step **1** and **2** **Removing and Creating New Container**.
* **Backup live server database before doing any of these steps**.
* It has been noticed that some of the backup services have some technical issues and therefore you are advised to double check the file size after restarting the backup service before removing and stopping the container. The other option you can manually backup facility database by yourself.



### Our automated deployment for mappings and serialized object comprises 5 steps:

##### 0. Preparatory Steps

* SSH into the server with `ssh openmrs@_SERVER_IP_ADDRESS`
* First check to see if your server has internet connectivity with `ping github.com`
* If not try to check contents of resolv.conf in /etc/ by running the following command: cat /etc/resolv.conf.Normally you should see google.com nameserver pointing to its ip 8.8.8.8.Edit the file if name server is not configured in the file.
* Nameserver(all in lowercase) 8.8.8.8.Ping 8.8.8.8 or google.com.After you may ping github.com just to make sure you are able to get packets from github.com

* Then download all of the files need with `git clone https://github.com/eRegister/docs.git `

* The command above will create a folder called `docs` in `/home/openmrs` if you didn't change to another directory. All of files that need to be transferred to the server are in **`docs/scripts/MappingsScript`**. Mapping folder contains the following files: <br/>
`concept_restore.sh`<br/>
`gitpull_bahmniapps.sh`<br/>
`gitpull_concepts.sh`<br/>
`gitpull_mappings.sh` <br/>
`gitpull_serial.sh`<br/>
`serializedobject_restore.sh`<br/>
`gitpullbahmniapps.service` <br/>
`gitpullconcepts.service` <br/>
`gitpullmappings.service`<br/>
`gitpullserializedobject.service`<br/>
* Go to `/development/` and create the following directories `openmrs_reporting_release` and `openmrs_concepts_release` and grant openmrs user permissions to own the files `sudo chown -R openmrs:openmrs directory_name`.
* Move the following files to `/usr/local/bin/` and make them executable:
`concept_restore.sh`,`serializedobject_restore`.
* Move `gitpull_concepts.sh` to `/development/openmrs_concepts_release` and `gitpull_serial.sh` to `/development/openmrs_reporting_release/`, make them executable.


!!! note
Files are already on the server

!!! caution
**PLEASE ENSURE THAT YOU HAVE BACKED UP THE DB BEFORE EXECUTING THE STEPS BELOW!!!**

##### 1. Removing Current Container

* check the running container: `docker ps`
* Stop the container: `docker stop openmrseregister`
* Check that the container has stopped run `docker ps` and you should see an empty table
* Create a new image from the stopped container: `docker commit openmrseregister omrsregrepo/bahmni_base:09082020` [*tag should be date at time of creating image*]
* you can check the newly created image with `docker images`
* Remove the container: `docker container rm openmrseregister`

##### 2. Creating a Volumes and enabling services

* Now it's time to create a new container from the image we created earlier with: `docker run -e container_name=openmrseregister -it -d --restart always -p 443:443 -p 80:80 -p 8069:8069 -p 8000:8000 --privileged --name openmrseregister -v /development/bahmni_config_release:/development/bahmni_config_release -v /development/dhisconnector_mappings:/development/dhisconnector_mappings -v /development/bahmniapps_release:/development/bahmniapps_release omrsregrepo/bahmni_base:06082020 /bin/bash
`
* Go to `/development/` and grant openmrs user permissions to files in `/development/dhisconnector_mappings` and `/development/bahmniapps_release`
* Move `gitpull_bahmniapps.sh` to `/development/bahmniapps_release` and `gitpull_mappings.sh` to `/development/dhisconnector_mappings`, make them executable.
* Create local repo's in all directories in `/development` except `/development/bahmni_config_release`, commands `git init` , `git remote add origin https://github.com:/eRegister/repo_name`
* test that you are able to fetch files from remote repo's by `git fetch --all`
* move all services `gitpullmappings.service`,`gitpullconcepts.serivce`,
`gitpullbahmniapps.service` and `gitpullserializedobject.service`.
* Nagivate into /etc/system/system/ and type the following commands to enable `gitpull_mappings.service`, `gitpullconcepts.service`, `gitpullbahmniapps.service`,`gitpullserializedobject.service`

`sudo chmod 664 service_name` <br/>
`sudo systemctl daemon-reload` <br />
`sudo systemctl enable service_name`

** Note:when the service has been registered successfully you should see created sym link in ** `/etc/systemd/system/default.target.wants/.`

##### 3. Configuring **cronjob**
* configure the cronjob to trigger the services everyday 7 am if our servers universal time is at UTC.
* to edit the cronjob do: `sudo crontab -e` if it's first time running the this command it'll probably ask you to choose the default text editor, please be kind enough to choose Nano as it's the easiest editor for most administrators.
* configure the script as shown below and then when the updates have been pulled successfully change the script to trigger services at **7:05**,**7:10**,**7:15**,**7:25** respectively.
**Do not change the command that trigger serialized object script** <br/>
`*/3 * * * * systemctl restart gitpullmappings.service >> /var/log gitpull_mappings.log` <br/>
`*/4 * * * * systemctl restart gitpullserializedobject.service >> /var/log/gitpull_serial.log` <br/>
`*/5 * * * * systemctl restart gitpullconcepts.service >> /var/log/gitpull_concepts.log` <br/>
`*/6 * * * * sudo bash /usr/local/bin/concepts_restore.sh >> /var/log/concept_restore.log` <br/>
`20 7 * * * sudo bash /usr/local/bin/serializedobject_restore.sh >> /var/log/serial_restore.log`
* Wait for a while for cron job to execute the commands and check directories in development have updates from GitHub. For failed services refer to [Automated Deployment](https://eregister.github.io/docs/ereg/automateddeployment/) **Exit Codes** to troubleshoot.



##### 4. Restore database and create soft links

* Go to into a container and start mysql service.
* Connect to database server using no password `mysql -uroot -p`
* Initialise openmrs database and users by sourcing openmsq.sql file in container root directory, `source openmrs.sql;`
* Wait a moment for databases to be created and once the script is done quit or exit the database server and restart mysql.
* Restore facility database using the command `mysql -uroot -ppassword openmrs;`
* Go to `/opt/openmrs/dhisconnector`
* Remove mappings folder and create soft link to `/development/dhisconnector_mappings/dhisconnector_mappings/mappings` <br/>
**command:** <br/> `sudo ln -s /development/dhisconnector_mappings/dhisconnector_mappings/mappings/ mappings` <br/>
* Exit the container and go to `/usr/local/bin` and run `serializedobject_restore.sh`
* Restart other services and openmrs the broswer to access openmrs admin page.
* Go to reporting you should see total of 36 openmrs period indicator reports. Refer to staging server to see example [eRegister Staging server](https://3.21.105.229/openmrs/)
Empty file added Integration-DHIS2.md
Empty file.
3 changes: 0 additions & 3 deletions contacts.md

This file was deleted.

3 changes: 3 additions & 0 deletions docs/contacts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contact Information

For more information, please contact below:
3 changes: 3 additions & 0 deletions docs/covid/About-Us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## This is an About Page

...information loading....New Version
2 changes: 2 additions & 0 deletions docs/covid/Alerts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

........content coming soon......
2 changes: 2 additions & 0 deletions docs/covid/Capturing-Weekly-Aggregate-Data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

........content coming soon......
48 changes: 48 additions & 0 deletions docs/covid/How-To-Prepare-Docker-Training-Instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
!!!note
we chose Docker over other many ways of installing DHIS2 because in a few minutes you can have your instance up and running


#### Installing Docker on the host server

Please refer to this [link](../ereg/intro.md) for installing Docker

#### Installling Docker Compose

* To install Docker Compose, please refer to the official Docker Compose site [here](https://www.docker.com)
* To prepare the training instance, we used two images:
* `dhis2 core 2.33`
* `dmillon/postgis` (_recommended because it already has postgis which DHIS2 depends on to render maps_)

#### Downloading the images

```
paste contents of docker-compose.yml

```

_you can change to whichever image you want to use. But please remember to drop SQL views before creating your dump_

You can go ahead and read [this](#) to prepare your instance. Within a few minutes you should by now have your DHIS2 instance running.

!!!warning
use `postgres` as your user for the db. It poses security threats (yes) but it's easier to deal with PostgreSQL with that setup. Unless ofcourse you're a PostgreSQL ninja.


#### Restoring Postgres Database

As you saw from the previous step, your instance is running two containers with networking between them handled by Docker Compose.
If you have a live connection to Postgres database, you can't drop and restore your db.

* Do `docker ps` to see all of the running containers. `docker-compose ps` also works fine.
* _it's important to do this step first because docker-compose is going to name according to how you named the folder containing the docker-compose.yml as well as how you labeled them **inside** the file_
* To do that, you have to kill the frontend DHIS2 container then restore the DB with `docker container kill <name_of_dhis_container>`
* Copy DB backup file into Postgres container with `docker cp dhis_db_backup.sql <name_of_postgres_container>:/`
* Get into the container with `docker exec -it <name_of_postgres_container> bash`
* Switch account from `root` to `postgres` with `su postgres` and then launch the PostgreSQL interactive terminal with `psql`
* `\l` to list all of the databases
* `drop database dhis2;` to delete the database
* `create database dhis2` to recreate the database. But now it's empty
* `\q` to the interactive terminal
* `psql --username=postgres --dbname=dhis2 < dhis_db_backup.sql` to restore all of data into the empty database. _if the command ran succefully, you should see a trail of verbosely listed SQL commands processed_
* Then the trail is done, do `exit` to exit the container
* Finally, start the container that we "killed" with `docker container start <name_of_dhis_container>`
4 changes: 4 additions & 0 deletions docs/covid/Indicators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


........content coming soon......

32 changes: 32 additions & 0 deletions docs/covid/Overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Welcome to the COVID19 Surviellance Tool Technical Guide

#### Overview

The COVID19 Surveillance system can be found here: [http://hmis.gov.ls/covid19](http://hmis.gov.ls/covid19)


This system is built off of DHIS2's Tracker Module. All of the broader user manuals can be found [here:](https://dhis2.github.io/dhis2-docs/master/en/user/html/dhis2_user_manual_en.html)

#### Table of Contents
In addition to that, we have developed guidelines specific to our context and usecases. The document structure looks like this:

```
COVID-19
└── Overview
└── Data Entry Guidelines
├── Registering a Case or Suspect
├── Capturing Weekly Aggregate Data
└── Using Mobile Devices
└── Technical
├── Alerts Dataset
├── Program Indicators
├── Indicators
├── Program Rules
└── How to Prepare Docker Training Instance
```

------------------------------------------------------------------------------------------------------------

#### Training Instance
We have also have a training instance which we try by all means to make it an up-to-date replica of the live system.
It can be found here: [http://197.155.193.109:1010/](http://197.155.193.109:1010/)
3 changes: 3 additions & 0 deletions docs/covid/Program-Indicators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@


........content coming soon......
3 changes: 3 additions & 0 deletions docs/covid/Program_Rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@


........content coming soon......
2 changes: 2 additions & 0 deletions docs/covid/Registering-a-Case-or-Suspect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

content loading....
2 changes: 2 additions & 0 deletions docs/covid/Using-Mobile-Devices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

content loading....
2 changes: 2 additions & 0 deletions docs/covid/Using-Mobile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

content loading....
2 changes: 2 additions & 0 deletions docs/covid/Using-Web-Aggregate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

........content coming soon......
2 changes: 2 additions & 0 deletions docs/covid/Validation-Rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

........content coming soon......
Empty file added docs/covid/Weekly-Report.md
Empty file.
7 changes: 7 additions & 0 deletions docs/covid/registering-a-case-mobile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### User Guide

........content coming soon......

### Trainer Guide

........content coming soon......
5 changes: 5 additions & 0 deletions docs/covid/using-web.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

### User Guide
........content coming soon......
### Trainer Guide
........content coming soon......
Loading