Skip to content

Commit 389df54

Browse files
BAH-2152 | Refactor. readme with instruction to configure a value
1 parent c25561d commit 389df54

2 files changed

Lines changed: 35 additions & 2 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,32 @@ If uploads are not allowed from the web (changable via a runtime property), you
2323
into the ~/.OpenMRS/modules folder. (Where ~/.OpenMRS is assumed to be the Application
2424
Data Directory that the running openmrs is currently using.) After putting the file in there
2525
simply restart OpenMRS/tomcat and the module will be loaded and started.
26+
27+
Configure values
28+
------------
29+
## Vagrant setup
30+
31+
You can configure values like, say location, concept and attribute names. you can check **api/src/main/java/org/bahmni/module/hip/Config.java** to know what are the values you can configure and default values.
32+
33+
### One time setup
34+
35+
1. create a file. For example, created `env_file` in `/etc/openmrs/` directory.
36+
2. To create conf file for openmrs service,`systemctl edit openmrs`. It will open blank file. paste the following lines in it
37+
```
38+
[Service]
39+
EnvironmentFile=/etc/openmrs/env_file
40+
```
41+
Note: You need to specify your created file path from 1st step in `EnvironmentFile` variable
42+
43+
### To configure values
44+
45+
You need to add values to the `env_file`. For example, if you need to specify custom values for Location and Phone Number attribute.
46+
```
47+
LOCATION=your_location
48+
PHONE_NUMBER=your_phoneNumber_attribute_name
49+
```
50+
Note: Attribute Name should be exactly same as enum keys from **api/src/main/java/org/bahmni/module/hip/Config.java**
51+
52+
## Docker setup
53+
54+
You can add values to the openmrs Environment variables, specifying same attribute name.

api/src/main/java/org/bahmni/module/hip/Config.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ public enum Config {
44

55

66
PATIENT_DOCUMENTS_PATH("/home/bahmni/document_images/"),
7-
ABHA_ADDRESS("ABHA Address"),
8-
LOCATION("Bahmni Clinics"),
7+
LOCATION("Bahmni Clinic"),
8+
9+
//attribute name
910
PHONE_NUMBER("phoneNumber"),
1011

12+
//identifier type
13+
ABHA_ADDRESS("ABHA Address"),
14+
1115
//encounterType
1216
CONSULTATION("Consultation"),
1317
PATIENT_DOCUMENT("Patient Document"),

0 commit comments

Comments
 (0)