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
276 changes: 138 additions & 138 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
@@ -1,138 +1,138 @@
benSearchByBenIDURL=${COMMON_API_BASE_URL}beneficiary/searchUserByID
userAuthURL=${COMMON_API_BASE_URL}user/userAuthenticate
# E-aushadhi
eaushadhiStoreStockDetailsUrl=${EAUSHADHI_URL}/rest/storeStockDetailsService/
eaushadhiStoreStockAckUrl=${EAUSHADHI_URL}/rest/AcknowledgeStoreStockService/
fhirUserName=${FHIR_USER_NAME}
fhirPassword=${FHIR_PASSWORD}
# DB Connections (MySQL)
spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# DB Connection (Mongo DB)
spring.data.mongodb.host=${MONGO_HOST}
spring.data.mongodb.port=27017
spring.data.mongodb.authentication-database=${MONGO_AUTH_DBNAME}
spring.data.mongodb.database=${MONGO_DBNAME}
spring.data.mongodb.username=${MONGO_USERNAME}
spring.data.mongodb.password=${MONGO_PASSWORD}
atomsFeedStartPage=1
parentUrl=${BAHMINI_URL}
atomFeedURLPatientDemographic=/openmrs/ws/atomfeed/patient/
atomFeedURLPatientEncounter=/openmrs/ws/atomfeed/encounter/
feedAuthUserName=${FEED_AUTH_URL}
feedAuthPassword=${FEED_AUTH_PASSWORD}
eAushadhiDummy=yes
##NDHM ABHA API
clientID=${NDHM_ABHA_CLIENT_ID}
clientSecret=${NDHM_ABHA_CLIENT_SECRET_KEY}
##Default ABDM Facility ID
abdmFacilityId= ${ABDM_FACILITY_ID}
ndhmuserAuthenticate=${ABDM_BASE_URL}/gateway/v0.5/sessions
ndhmGenerateOTP=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/mobile/generateOtp
ndhmVerifyOTP=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/mobile/verifyOtp
ndhmCreateHealthID=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/mobile/createHealthId
## ABHA with aadhaar
ndhmGenerateOTPWithAadhaar=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/generateOtp
ndhmCreateHealthIDWithAadhaar=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/createHealthIdWithAadhaarOtp
## ABHA Creation New APIs
abdmVerifyOTP= ${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/verifyOTP
abdmCheckAndGenerateMobileOTP= ${ABDM_HEALTH_ID_BASE_URL}/api/v2/registration/aadhaar/checkAndGenerateMobileOTP
abdmVerifyMobileOTP= ${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/verifyMobileOTP
abdmcreateHealthIdWithPreVerified= ${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/createHealthIdWithPreVerified
##CareContext Creation API
generateOTPForCareContext=${ABDM_BASE_URL}/gateway/v0.5/users/auth/init
addCareContext = ${ABDM_BASE_URL}/gateway/v0.5/links/link/add-contexts
validateOTPForCareContext=${ABDM_BASE_URL}/gateway/v0.5/users/auth/confirm
##ABHA Card API
## Auth init - aadhar / mobile
generateOTP_ForCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/init
## confirm with mobile OTP
verifyOTP_ForCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/confirmWithMobileOTP
## confirm with Aadhaar
verifyOTP_ForCard_Aadhaar=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/confirmWithAadhaarOtp
## print ABHA card - PNG
generateHealthCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/health/facility/getPngCard
generateHealthIDCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/account/getPngCard
## Generate Notify SMS once episode completed
generateABDM_NotifySMS=${ABDM_BASE_URL}/gateway/v1/patients/sms/notify2
##verifyBio
abdmVerifyBio=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/verifyBio
abdmGenerateMobileOTP=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/generateMobileOTP
abdmConfirmAadhaarBio=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/confirmWithAadhaarBio
abdmAccountProfile=${ABDM_ACCOUNT_ID_BASE_URL}/api/v1/account/profile
##ABDM Facility services
getAbdmFacilityServicies= ${ABDM_HIECM_BASE_URL}/api/hiecm/gateway/v3/bridge-services
##ABDM V3 APIs
abdmV3UserAuthenticate = ${ABDM_HIECM_BASE_URL}/api/hiecm/gateway/v3/sessions
getAuthCertPublicKey = ${ABDM_ABHA_V3_URL}/v3/profile/public/certificate
requestOtpForEnrollment = ${ABDM_ABHA_V3_URL}/v3/enrollment/request/otp
abhaEnrollByAadhaar = ${ABDM_ABHA_V3_URL}/v3/enrollment/enrol/byAadhaar
printAbhaCard = ${ABDM_ABHA_V3_URL}/v3/profile/account/abha-card
abhaLoginRequestOtp = ${ABDM_ABHA_V3_URL}/v3/profile/login/request/otp
verifyAbhaLogin = ${ABDM_ABHA_V3_URL}/v3/profile/login/verify
abhaProfileLoginVerifyUser = ${ABDM_ABHA_V3_URL}/v3/profile/login/verify/user
requestAuthByAbdm = ${ABDM_ABHA_V3_URL}/v3/enrollment/auth/byAbdm
webLoginAbhaRequestOtp = ${ABDM_PHR_URL}/login/abha/request/otp
webLoginAbhaVerify = ${ABDM_PHR_URL}/login/abha/verify
webLoginPhrCard = ${ABDM_PHR_URL}/login/profile/abha/phr-card
## ABDM V3 M2 APIs
generateTokenForLinkCareContext = @env.ABDM_HIECM_BASE_URL@/api/hiecm/v3/token/generate-token
linkCareContext = @env.ABDM_HIECM_BASE_URL@/api/hiecm/hip/v3/link/carecontext
x-CM-ID=${X_CM_ID}
abhaMode=${ABHA_MODE}
#logging.pattern.level=DEBUG
logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
logging.level.com.iemr=DEBUG
logging.level.org.springframework=INFO
#ELK logging file name
logging.path=logs/
logging.file.name=${FHIR_API_LOGGING_FILE_NAME}
jwt.secret=${JWT_SECRET_KEY}
springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}
# Redis IP
spring.redis.host=${REDIS_HOST}
hipSystemUrl= ${HIP_SYSTEM_URL}
# Elasticsearch Configuration
elasticsearch.host=${ELASTICSEARCH_HOST}
elasticsearch.port=${ELASTICSEARCH_PORT}
elasticsearch.username=${ELASTICSEARCH_USERNAME}
elasticsearch.password=${ELASTICSEARCH_PASSWORD}
elasticsearch.index.beneficiary=${ELASTICSEARCH_INDEX_BENEFICIARY}
# Enable/Disable ES (for gradual rollout)
elasticsearch.enabled=${ELASTICSEARCH_ENABLED}
benSearchByBenIDURL=${COMMON_API_BASE_URL}beneficiary/searchUserByID
userAuthURL=${COMMON_API_BASE_URL}user/userAuthenticate

# E-aushadhi
eaushadhiStoreStockDetailsUrl=${EAUSHADHI_URL}/rest/storeStockDetailsService/
eaushadhiStoreStockAckUrl=${EAUSHADHI_URL}/rest/AcknowledgeStoreStockService/

fhirUserName=${FHIR_USER_NAME}
fhirPassword=${FHIR_PASSWORD}

# DB Connections (MySQL)
spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check configured MySQL connector dependency version and driver references.
fd -a "pom.xml" "build.gradle" "build.gradle.kts" | xargs -r rg -n -C2 'mysql-connector|mysql\.connector|com\.mysql\.jdbc\.Driver|com\.mysql\.cj\.jdbc\.Driver'

Repository: PSMRI/FHIR-API

Length of output: 220


🏁 Script executed:

#!/bin/bash
# Find build configuration files
echo "=== Searching for build configuration files ==="
fd "pom\.xml|build\.gradle" --type f

echo -e "\n=== Searching for MySQL connector dependency ==="
fd "pom\.xml|build\.gradle" --type f | xargs -r rg -n "mysql-connector|mysql\.connector"

echo -e "\n=== Searching for driver class references ==="
rg -n "com\.mysql\.(jdbc|cj\.jdbc)\.Driver" --type properties --type java --type gradle --type xml

Repository: PSMRI/FHIR-API

Length of output: 389


🏁 Script executed:

#!/bin/bash
# Get the MySQL connector version from pom.xml
echo "=== MySQL connector dependency details from pom.xml ==="
rg -A 3 -B 1 "mysql-connector-j" pom.xml

# Check the driver class in the properties file
echo -e "\n=== Driver class in common_docker.properties ==="
cat -n src/main/environment/common_docker.properties | grep -i driver

Repository: PSMRI/FHIR-API

Length of output: 440


🏁 Script executed:

#!/bin/bash
# Check for all references to MySQL driver classes in the codebase
echo "=== All references to MySQL driver classes ==="
rg "com\.mysql\.(jdbc|cj\.jdbc)\.Driver" -n

# Check if there are other properties files that might have the same issue
echo -e "\n=== Other properties files in environment config ==="
fd "\.properties$" src/main/environment/

Repository: PSMRI/FHIR-API

Length of output: 611


Update MySQL driver class in all environment property files for Connector/J 8.2.0 compatibility.

com.mysql.jdbc.Driver is incompatible with MySQL Connector/J 8.x. The project uses version 8.2.0, which requires com.mysql.cj.jdbc.Driver. Using the legacy driver class will cause datasource initialization failures at runtime.

This issue exists in three files:

  • src/main/environment/common_docker.properties (line 15)
  • src/main/environment/common_ci.properties (line 15)
  • src/main/environment/common_example.properties (line 16)
Proposed fix

Update all three files:

-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
πŸ“ 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
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/environment/common_docker.properties` at line 15, Replace the legacy
MySQL driver class value for the spring.datasource.driver-class-name property in
all environment property files (currently set to com.mysql.jdbc.Driver) with the
Connector/J 8.x compatible class com.mysql.cj.jdbc.Driver; update the
occurrences in the files that contain spring.datasource.driver-class-name to use
com.mysql.cj.jdbc.Driver so datasource initialization works with MySQL
Connector/J 8.2.0.


# DB Connection (Mongo DB)
spring.data.mongodb.host=${MONGO_HOST}
spring.data.mongodb.port=27017
spring.data.mongodb.authentication-database=${MONGO_AUTH_DBNAME}
spring.data.mongodb.database=${MONGO_DBNAME}
spring.data.mongodb.username=${MONGO_USERNAME}
spring.data.mongodb.password=${MONGO_PASSWORD}

atomsFeedStartPage=1
parentUrl=${BAHMINI_URL}

atomFeedURLPatientDemographic=/openmrs/ws/atomfeed/patient/
atomFeedURLPatientEncounter=/openmrs/ws/atomfeed/encounter/

feedAuthUserName=${FEED_AUTH_URL}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify which env var is actually defined/used for feed auth username.
rg -n -C2 'feedAuthUserName|FEED_AUTH_URL|FEED_AUTH_USERNAME|feedAuthPassword' --type=properties --type=yaml --type=env --type=sh

Repository: PSMRI/FHIR-API

Length of output: 92


🏁 Script executed:

#!/bin/bash
# Search for references to feed auth variables across the entire repo
echo "=== Searching for feedAuthUserName ==="
rg -n 'feedAuthUserName' --no-heading

echo -e "\n=== Searching for FEED_AUTH_URL ==="
rg -n 'FEED_AUTH_URL' --no-heading

echo -e "\n=== Searching for FEED_AUTH_USERNAME ==="
rg -n 'FEED_AUTH_USERNAME' --no-heading

echo -e "\n=== Searching for feedAuthPassword ==="
rg -n 'feedAuthPassword' --no-heading

echo -e "\n=== Searching for FEED_AUTH in properties files ==="
find . -name "*.properties" -type f -exec grep -Hn "FEED_AUTH\|feedAuth" {} \;

Repository: PSMRI/FHIR-API

Length of output: 2715


feedAuthUserName is mapped to the wrong environment variable.

feedAuthUserName uses ${FEED_AUTH_URL} while the corresponding password field correctly uses ${FEED_AUTH_PASSWORD}. This mismatch causes authentication failures at runtime since a URL value will be injected where a username is expected. The property should map to ${FEED_AUTH_USERNAME} for consistency.

Proposed fix
-feedAuthUserName=${FEED_AUTH_URL}
+feedAuthUserName=${FEED_AUTH_USERNAME}
πŸ“ 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
feedAuthUserName=${FEED_AUTH_URL}
feedAuthUserName=${FEED_AUTH_USERNAME}
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main/environment/common_docker.properties` at line 31, The property
feedAuthUserName is mapped to the wrong env var (uses ${FEED_AUTH_URL}); update
the mapping so feedAuthUserName=${FEED_AUTH_USERNAME} to match the credential
pair (the corresponding password uses ${FEED_AUTH_PASSWORD})β€”edit the
feedAuthUserName entry in common_docker.properties to reference
FEED_AUTH_USERNAME.

feedAuthPassword=${FEED_AUTH_PASSWORD}

eAushadhiDummy=yes

##NDHM ABHA API
clientID=${NDHM_ABHA_CLIENT_ID}
clientSecret=${NDHM_ABHA_CLIENT_SECRET_KEY}

##Default ABDM Facility ID
abdmFacilityId= ${ABDM_FACILITY_ID}

ndhmuserAuthenticate=${ABDM_BASE_URL}/gateway/v0.5/sessions
ndhmGenerateOTP=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/mobile/generateOtp
ndhmVerifyOTP=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/mobile/verifyOtp
ndhmCreateHealthID=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/mobile/createHealthId

## ABHA with aadhaar
ndhmGenerateOTPWithAadhaar=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/generateOtp
ndhmCreateHealthIDWithAadhaar=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/createHealthIdWithAadhaarOtp

## ABHA Creation New APIs
abdmVerifyOTP= ${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/verifyOTP
abdmCheckAndGenerateMobileOTP= ${ABDM_HEALTH_ID_BASE_URL}/api/v2/registration/aadhaar/checkAndGenerateMobileOTP
abdmVerifyMobileOTP= ${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/verifyMobileOTP
abdmcreateHealthIdWithPreVerified= ${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/createHealthIdWithPreVerified


##CareContext Creation API
generateOTPForCareContext=${ABDM_BASE_URL}/gateway/v0.5/users/auth/init
addCareContext = ${ABDM_BASE_URL}/gateway/v0.5/links/link/add-contexts
validateOTPForCareContext=${ABDM_BASE_URL}/gateway/v0.5/users/auth/confirm

##ABHA Card API
## Auth init - aadhar / mobile
generateOTP_ForCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/init
## confirm with mobile OTP
verifyOTP_ForCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/confirmWithMobileOTP
## confirm with Aadhaar
verifyOTP_ForCard_Aadhaar=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/confirmWithAadhaarOtp
## print ABHA card - PNG
generateHealthCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/health/facility/getPngCard
generateHealthIDCard=${ABDM_HEALTH_ID_BASE_URL}/api/v1/account/getPngCard

## Generate Notify SMS once episode completed
generateABDM_NotifySMS=${ABDM_BASE_URL}/gateway/v1/patients/sms/notify2

##verifyBio
abdmVerifyBio=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/verifyBio
abdmGenerateMobileOTP=${ABDM_HEALTH_ID_BASE_URL}/api/v1/registration/aadhaar/generateMobileOTP
abdmConfirmAadhaarBio=${ABDM_HEALTH_ID_BASE_URL}/api/v1/auth/confirmWithAadhaarBio
abdmAccountProfile=${ABDM_ACCOUNT_ID_BASE_URL}/api/v1/account/profile

##ABDM Facility services
getAbdmFacilityServicies= ${ABDM_HIECM_BASE_URL}/api/hiecm/gateway/v3/bridge-services

##ABDM V3 APIs
abdmV3UserAuthenticate = ${ABDM_HIECM_BASE_URL}/api/hiecm/gateway/v3/sessions
getAuthCertPublicKey = ${ABDM_ABHA_V3_URL}/v3/profile/public/certificate
requestOtpForEnrollment = ${ABDM_ABHA_V3_URL}/v3/enrollment/request/otp
abhaEnrollByAadhaar = ${ABDM_ABHA_V3_URL}/v3/enrollment/enrol/byAadhaar
printAbhaCard = ${ABDM_ABHA_V3_URL}/v3/profile/account/abha-card
abhaLoginRequestOtp = ${ABDM_ABHA_V3_URL}/v3/profile/login/request/otp
verifyAbhaLogin = ${ABDM_ABHA_V3_URL}/v3/profile/login/verify
abhaProfileLoginVerifyUser = ${ABDM_ABHA_V3_URL}/v3/profile/login/verify/user
requestAuthByAbdm = ${ABDM_ABHA_V3_URL}/v3/enrollment/auth/byAbdm
webLoginAbhaRequestOtp = ${ABDM_PHR_URL}/login/abha/request/otp
webLoginAbhaVerify = ${ABDM_PHR_URL}/login/abha/verify
webLoginPhrCard = ${ABDM_PHR_URL}/login/profile/abha/phr-card

## ABDM V3 M2 APIs
generateTokenForLinkCareContext = ${ABDM_HIECM_BASE_URL}/api/hiecm/v3/token/generate-token
linkCareContext = ${ABDM_HIECM_BASE_URL}/api/hiecm/hip/v3/link/carecontext

x-CM-ID=${X_CM_ID}
abhaMode=${ABHA_MODE}

#logging.pattern.level=DEBUG
logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
logging.level.com.iemr=DEBUG
logging.level.org.springframework=INFO

#ELK logging file name
logging.path=logs/
logging.file.name=${FHIR_API_LOGGING_FILE_NAME}
jwt.secret=${JWT_SECRET_KEY}

springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}

# Redis IP
spring.redis.host=${REDIS_HOST}


hipSystemUrl= ${HIP_SYSTEM_URL}

# Elasticsearch Configuration
elasticsearch.host=${ELASTICSEARCH_HOST}
elasticsearch.port=${ELASTICSEARCH_PORT}
elasticsearch.username=${ELASTICSEARCH_USERNAME}
elasticsearch.password=${ELASTICSEARCH_PASSWORD}
elasticsearch.index.beneficiary=${ELASTICSEARCH_INDEX_BENEFICIARY}

# Enable/Disable ES (for gradual rollout)
elasticsearch.enabled=${ELASTICSEARCH_ENABLED}

Loading