Skip to content
Merged
Changes from all commits
Commits
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
85 changes: 70 additions & 15 deletions src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# local env
server.port=8083
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security: Avoid committing sensitive credentials

The database configuration exposes sensitive credentials:

  1. Plain text passwords
  2. Root user access
  3. Direct database URLs

Consider these security improvements:

  1. Use environment variables or secure vault for credentials
  2. Create dedicated database users with limited privileges
  3. Add placeholders instead of actual values in example properties
-spring.datasource.username=root
-spring.datasource.password=1234
+spring.datasource.username=${DB_USER}
+spring.datasource.password=${DB_PASSWORD}

Also applies to: 4-6, 13-15

# DB Connections
spring.datasource.url=<Enter AMRIT DB_IEMR URL here>
spring.datasource.username=<Enter your AMRIT DB_IEMR username>
spring.datasource.password=<Enter your AMRIT DB_IEMR password>
spring.datasource.url=jdbc:mysql://localhost:3306/db_iemr
spring.datasource.username=root
spring.datasource.password=1234

spring.datasource.url=jdbc:mysql://localhost:3306/db_iemr?autoReconnect=true&useSSL=false
encDbUserName=zFlYsp9Z0s+lRvLM15A3g/Ba0w8VGs/1usuW7EsGF3k=
encDbPass=JGGAGn5wTlrbTLUHY+5BzfBa0w8VGs/1usuW7EsGF3k=
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

secondary.datasource.username=<Enter your DB_REPORTING username>
secondary.datasource.password=<Enter your DB_REPORTING password>
secondary.datasource.url=<Enter DB_REPORTING URL here>
secondary.datasource.username=root
secondary.datasource.password=1234
secondary.datasource.url=jdbc:mysql://localhost:3306/db_reporting
secondary.datasource.driver-class-name=com.mysql.jdbc.Driver

fileBasePath =<Enter your required basepath here>/Doc

# KM config
km-base-url=http://10.208.122.38:8084/OpenKM
Expand All @@ -25,8 +24,11 @@ cti-server-ip=10.208.122.99
cti-logger_base_url=http://10.208.122.99/logger

# Identity Config
identity-api-url = http://localhost:8080/identity-0.0.1
identity-1097-api-url = http://localhost:8080/1097identityapi-v1.0
identity-api-url = http://localhost:8094/
#Verify whether 1097 and identity are same?
identity-1097-api-url = http://localhost:8095/
##Generate Benificiary Config
genben-api=http://localhost:8092/
Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Remove unnecessary path segments from API URLs

Based on the PR comments discussion between drtechie and Asp-irin, the /identity-0.0.1 path segment should be removed when running locally.

Apply this diff to update the URLs:

-identity-api-url = http://localhost:8094/
-identity-1097-api-url = http://localhost:8095/ 
-genben-api=http://localhost:8092/
+identity-api-url = ${IDENTITY_API_URL:http://localhost:8094}
+identity-1097-api-url = ${IDENTITY_1097_API_URL:http://localhost:8095}
+genben-api=${GENBEN_API_URL:http://localhost:8092}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
identity-api-url = http://localhost:8094/
#Verify whether 1097 and identity are same?
identity-1097-api-url = http://localhost:8095/
##Generate Benificiary Config
genben-api=http://localhost:8092/
identity-api-url = ${IDENTITY_API_URL:http://localhost:8094}
#Verify whether 1097 and identity are same?
identity-1097-api-url = ${IDENTITY_1097_API_URL:http://localhost:8095}
##Generate Benificiary Config
genben-api=${GENBEN_API_URL:http://localhost:8092}


#### SMS Configuration
send-sms=false
Expand All @@ -53,18 +55,70 @@ spring.mail.properties.mail.smtp.starttls.enable=true
start-email-scheduler=true
cron-scheduler-email=0 0/1 * * * ? *

##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------

start-ctidatasync-scheduler=false
cron-scheduler-ctidatasync=0 0 2 */2 * ?

##-------------------------------###cti data check with call detail report Scheduler------------------------------------------------------

#Runs at everyday 12:10AM
start-ctidatacheck-scheduler=true
cron-scheduler-ctidatacheck=0 10 00 * * *

##---------------------------------#### Registration schedular for Avni------------------------------------------------------------------------------

start-avni-scheduler=false
cron-avni-registration=0 0/1 * * * ? *

##------------------------------------------------#### Everwell Regsitration Scheduler---------------------------------------------------------------

start-registration-scheduler=false
cron-scheduler-registration=0 34 19 * * ? *

##----------------------------------------------------#everwell data sync-----------------------------------------------------------

start-everwelldatasync-scheduler=false
cron-scheduler-everwelldatasync=0 0/5 * * * ? *

##-----------------------------------------------#NHM data dashboard schedular----------------------------------------------------------------
# run at everyday 12:01AM
start-nhmdashboard-scheduler=true
cron-scheduler-nhmdashboard=0 1 * * * ? *
##----------------------------------------------------#grievance data sync-----------------------------------------------------------

start-grievancedatasync-scheduler=false
cron-scheduler-grievancedatasync=0 0/5 * * * ? *

### generate Beneficiary Config
genben-api=http://localhost:8080/bengenapi-v1.0

### Redis IP
spring.redis.host=localhost

##---------------------------------------------------------------------------------------------------------------
###CTI data sync schedular
cz-duration=40
##---------------------------------------------------------------------------------------------------------------
## prescription template
TMprescriptionTemplate=TMPrescription
##---------------------------------------------------------------------------------------------------------------
##duration for everwell calender
everwellCalendarDuration=15
##---------------------------------------------------------------------------------------------------------------
##lonic variables
lonicPageSize=10
##---------------------------------------------------------------------------------------------------------------
#snomedcti
snomedCTPageSize=10
##---------------------------------------------------------------------------------------------------------------
#call retry count
callRetryConfiguration=3
##---------------------------------------------------------------------------------------------------------------
#avni registration Duration
avniRegistrationLimit=7

#--------------------------NHM Agent Real Time Data----------------------------
nhm.agent.real.time.data.url= http://175.101.1.83/apps/utility/alive_api.php
nhm.agent.real.time.data.cron.scheduler=0 */2 * ? * *
nhm.agent.real.time.data.cron.flag=true

carestream_socket_ip = 192.168.43.39
carestream_socket_port = 1235
Expand All @@ -81,9 +135,9 @@ everwellEditDoses = https://beta-hub.everwell.org/Api/Patients/EditManualDoses
everwellEditMissedDoses = https://beta-hub.everwell.org/Api/Patients/EditMissedDoses
everwellGetPatientAdherenceUrl = https://beta-hub.everwell.org/Api/Patients/CurrentMonthMissedAdherence?Page=
everwellEditSecondaryPhoneNo = https://beta-hub.everwell.org/Api/Patients/EditPhoneNumber
everwell1097userAuthenticate = http://10.208.122.38:8080/commonapi-v1.0/user/userAuthenticate
everwell1097userAuthenticate = http://localhost:8083/user/userAuthenticate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Standardize API endpoint configuration

The Everwell API endpoints should use environment variables for consistency with other configurations.

-everwell1097userAuthenticate =  http://localhost:8083/user/userAuthenticate
-everwellRegisterBenficiary = http://localhost:8083/beneficiary/create
+everwell1097userAuthenticate = ${EVERWELL_API_BASE_URL}/user/userAuthenticate
+everwellRegisterBenficiary = ${EVERWELL_API_BASE_URL}/beneficiary/create

Also applies to: 141-141

everwelluserAuthenticate = https://beta-hub.everwell.org/token
everwellRegisterBenficiary = http://10.208.122.38:8080/commonapi-v1.0/beneficiary/create
everwellRegisterBenficiary = http://localhost:8083/beneficiary/create


## LungAssessment credentials
Expand Down Expand Up @@ -115,6 +169,7 @@ eausadhaAuthorization=<Enter eausadha authorization key>
spring.main.allow-bean-definition-overriding=true
spring.main.allow-circular-references=true

fileBasePath =<Enter your required basepath here>/Doc
##grievance API call
updateGrievanceDetails = <ENTER GRIEVANCE_API_BASE_URL>/grsbepro/igemr1097/public/api/v1/state-wise/grievance-list
updateGrievanceTransactionDetails=<ENTER GRIEVANCE_API_BASE_URL>/grsbepro/igemr1097/public/api/v1/grievance_details/
Expand Down