Collection of PIH Malawi customizations to OpenMRS
This represents the overall distribution and customization module for PIH Malawi
## Build PIH Malawi development environment with OpenMRS SDK
**NOTE**
The following are variables which can be modified:
```
serverId = malawi
database = openmrs_neno
source code = ~/workspace
module name = pihmalawi for openmrs-module-pihmalawi
```
### Linux instructions
#### Install prerequisites
1. Install Java and Maven
2. Install git
- sudo apt-get install git
3. To setup the OpenMRS SDK, you just need to open up a terminal/console and enter:
- mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk
##### Configure mySQL Server to work with OpenMRS
1. Edit MySQL server config file
- On Mac OS, the config file is located at **_/etc/my.cnf_**:
```
default-time-zone=-4:00
```
- On Ubuntu
```
default-time-zone=”America/New_York"
```
- I think in Malawi the GMT offset is +2:00?
2. Restart mysql server
3. Log on mysql server and check the time zone:
```
mysql -u root -p
SELECT @@global.time_zone;
```
4. It should display something like:
```
+--------------------+
| @@global.time_zone |
+--------------------+
| -04:00 |
+--------------------+
```
#### Source the PIH Malawi database
Download a *de-identified* backup and source the database:
```
mysql -u root -p mysql
(enter password)
CREATE DATABASE openmrs_neno DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON `openmrs_neno`.* TO 'openmrs'@'localhost' IDENTIFIED BY 'openmrs';
use openmrs_neno;
source *name of openmrs neno database*.sql
```
#### Install OpenMRS SDK
1. Setup source code directory
- cd ~
- mkdir workspace
- cd workspace
2. Get PIH Malawi module from git
- git clone
github.com pihmalawi
3. Install the PIH Malawi omod in your local maven repo
- from the directory you have PIH Malawi checked out build the pihmalawi distribution:
```
mvn clean install -DskipTests -Pdistribution
```
4. Setup SDK
- mvn openmrs-sdk:setup -DserverId=malaw …