Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
eea002b
fix: add clinical staff information
vanitha1822 Jul 14, 2026
5b6bcf0
fix: pom version
vanitha1822 Jul 14, 2026
1624318
Merge pull request #173 from PSMRI/nd/vs/clinical_staff
vishwab1 Aug 10, 2026
8597bba
fix: add the endpoints and schema for downsync from central to local
vanitha1822 Aug 20, 2026
9815769
fix: downsync implementation
vanitha1822 Aug 24, 2026
1090c4b
fix: build issue
vanitha1822 Aug 24, 2026
eaf2edd
fix: lastmoddate updation
vanitha1822 Aug 25, 2026
40686bd
fix: update the response of downsync
vanitha1822 Aug 27, 2026
c8c5cb7
fix: update the continuous call on check sync progress
vanitha1822 Aug 27, 2026
2f35483
fix: column name issue for stoptb tables
vanitha1822 Aug 27, 2026
7b2213b
fix: issue in stoptb tables
vanitha1822 Aug 27, 2026
a9e7768
fix: add central id
vanitha1822 Sep 1, 2026
c01a97b
fix: FK Mapping issue
vanitha1822 Sep 1, 2026
6dfae61
fix: downsync issue
vanitha1822 Sep 1, 2026
9e25ef6
fix: FK issue in i_ beneficiarymapping table
vanitha1822 Sep 1, 2026
8988062
fix: include U for downsync again
vanitha1822 Sep 1, 2026
7c68c8b
fix: revert central id for m_beneficiaryregidmapping
vanitha1822 Sep 1, 2026
822a04d
fix: conflict section
vanitha1822 Sep 1, 2026
f983c85
fix: manage conflicts and add F flag for resync
vanitha1822 Sep 1, 2026
21c488c
fix: pom version update
vanitha1822 Sep 2, 2026
944f6f7
fix: add the condition to block the download from different van
vanitha1822 Sep 2, 2026
fd55819
fix: resolve foreign key violation
vanitha1822 Sep 2, 2026
4215eb8
fix: retry failed records
vanitha1822 Sep 2, 2026
0924990
fix: update 'F' flag
vanitha1822 Sep 2, 2026
0f6837b
fix: sonarqube comments
vanitha1822 Sep 4, 2026
f3b9f56
Merge remote-tracking branch 'origin/release-3.9.0' into nd/vs/stoptb…
vanitha1822 Sep 4, 2026
b7005a3
fix: resolve sonarcube comments
vanitha1822 Sep 4, 2026
ab87e18
fix: issue in m_beneficiaryregidmapping table
vanitha1822 Sep 9, 2026
92e6ccb
Merge remote-tracking branch 'origin/release-3.8.4' into vb/3.8.4-3.9.0
vishwab1 Sep 10, 2026
a02ab91
Merge pull request #179 from PSMRI/nd/vs/stoptb_downsync
vishwab1 Sep 10, 2026
4f56d8a
Merge pull request #182 from PSMRI/vb/3.8.4-3.9.0
snehar-nd Sep 10, 2026
03da110
Adding api's for syncing diagnostic documents to s3
sehjotsinghunthinkable Sep 11, 2026
0782c44
fix: add the endpoints and schema for downsync from central to local
vanitha1822 Aug 20, 2026
ad2ccaa
fix: downsync implementation
vanitha1822 Aug 24, 2026
b0ca63f
fix: build issue
vanitha1822 Aug 24, 2026
e9ddd75
fix: lastmoddate updation
vanitha1822 Aug 25, 2026
2c957c9
fix: update the response of downsync
vanitha1822 Aug 27, 2026
d0438c1
fix: update the continuous call on check sync progress
vanitha1822 Aug 27, 2026
6eb9221
fix: column name issue for stoptb tables
vanitha1822 Aug 27, 2026
af58fa0
fix: issue in stoptb tables
vanitha1822 Aug 27, 2026
c4a4142
fix: add central id
vanitha1822 Sep 1, 2026
0e957e3
fix: FK Mapping issue
vanitha1822 Sep 1, 2026
48c98e8
fix: downsync issue
vanitha1822 Sep 1, 2026
4c11d31
fix: FK issue in i_ beneficiarymapping table
vanitha1822 Sep 1, 2026
e267058
fix: include U for downsync again
vanitha1822 Sep 1, 2026
7dc70ef
fix: revert central id for m_beneficiaryregidmapping
vanitha1822 Sep 1, 2026
5442526
fix: conflict section
vanitha1822 Sep 1, 2026
1b65b93
fix: manage conflicts and add F flag for resync
vanitha1822 Sep 1, 2026
a4c35a9
fix: pom version update
vanitha1822 Sep 2, 2026
ae5a424
fix: add the condition to block the download from different van
vanitha1822 Sep 2, 2026
2fedd6d
fix: resolve foreign key violation
vanitha1822 Sep 2, 2026
ddf96cd
fix: retry failed records
vanitha1822 Sep 2, 2026
f1c5078
fix: update 'F' flag
vanitha1822 Sep 2, 2026
8009ccc
fix: sonarqube comments
vanitha1822 Sep 4, 2026
df18a20
fix: add clinical staff information
vanitha1822 Jul 14, 2026
3fc6583
fix: pom version
vanitha1822 Jul 14, 2026
f757174
fix: resolve sonarcube comments
vanitha1822 Sep 4, 2026
4c62154
fix: issue in m_beneficiaryregidmapping table
vanitha1822 Sep 9, 2026
80304ef
Adding api's for syncing diagnostic documents to s3
sehjotsinghunthinkable Sep 11, 2026
24ae8ec
Merge branch 'release-3.9.0' into feature/diagnostic-document-sync
sehjotsinghunthinkable Sep 11, 2026
5d1182a
Adding api's for syncing diagnostic documents to s3
sehjotsinghunthinkable Sep 11, 2026
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
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.iemr.mmu</groupId>
<artifactId>mmu-api</artifactId>
<version>3.6.2</version>
<version>3.9.0</version>
<packaging>war</packaging>

<name>MMU-API</name>
Expand Down Expand Up @@ -292,6 +292,12 @@
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- AWS SDK v2 - S3 client, used for diagnostic document sync -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.11.0</version>
</dependency>
<!-- CSV parsing for the Nikshay results-file import (quoted/embedded-comma fields) -->
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
20 changes: 20 additions & 0 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ spring.datasource.username=@env.DATABASE_USERNAME@
spring.datasource.password=@env.DATABASE_PASSWORD@
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

## S3 storage for diagnostic documents pushed from a van
aws.s3.access-key=@env.AWS_S3_ACCESS_KEY@
aws.s3.secret-key=@env.AWS_S3_SECRET_KEY@
aws.s3.region=@env.AWS_S3_REGION@
diagnostic.documents.s3.bucket=@env.DIAGNOSTIC_DOCUMENTS_S3_BUCKET@

## Carestream URLs, local
carestreamOrderCreateURL=@env.COMMON_API@carestream/createOrder

Expand All @@ -28,6 +34,11 @@ dataSyncUploadUrl=@env.MMU_CENTRAL_SERVER@dataSync/van-to-server
## Data download API, central
dataSyncDownloadUrl=@env.MMU_CENTRAL_SERVER@dataSync/server-to-van

## Diagnostic document push (this server -> further central server)
diagnosticDocumentUploadUrl=@env.MMU_CENTRAL_SERVER@dataSync/diagnostic-documents
diagnosticDocument.push.batchSize=@env.DIAGNOSTIC_DOCUMENT_PUSH_BATCH_SIZE@
diagnostic.documents.storage-root=@env.DIAGNOSTIC_DOCUMENTS_STORAGE_ROOT@

## TC specialist slot booking, # not required
tcSpecialistSlotBook=@env.TM_API@schedule/bookSlot

Expand All @@ -51,6 +62,15 @@ dataSyncTransactionDownloadUrl=@env.MMU_CENTRAL_SERVER@dataSync/server-to-van-tr
## inventory transaction processed flag update URL, central, mmu
dataSyncProcessedFlagUpdate=@env.MMU_CENTRAL_SERVER@dataSync/updateProcessedFlagPostDownload

## down-sync (central -> local) data API, central, mmu
downSyncDataUrl=@env.MMU_CENTRAL_SERVER@dataSync/server-to-van-downsync

## down-sync (central -> local) flag update API, central, mmu
downSyncFlagUpdateUrl=@env.MMU_CENTRAL_SERVER@dataSync/updateDownSyncFlagPostDownload

## mark an up-synced record as already delivered to the van (central only)
downSync.markDeliveredOnUpSync=true


fileBasePath =@env.MMU_FILE_BASE_PATH@

Expand Down
192 changes: 106 additions & 86 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
@@ -1,87 +1,107 @@
# local env
# DB Connections
spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

## Carestream URLs, local
carestreamOrderCreateURL=${COMMON_API}carestream/createOrder

## Identity - Common URLs
# Registration
registrationUrl =${COMMON_API}beneficiary/createBeneficiary

registrarQuickSearchByIdUrl =${COMMON_API}beneficiary/searchUserByID

registrarQuickSearchByPhoneNoUrl =${COMMON_API}beneficiary/searchUserByPhone

getBenImageFromIdentity =${IDENTITY_API_BASE_URL}id/benImageByBenRegID

beneficiaryEditUrl =${COMMON_API}beneficiary/updateBenefciaryDetails

registrarAdvanceSearchUrl =${COMMON_API}beneficiary/searchBeneficiary

## Data Sync API, central
dataSyncUploadUrl=${MMU_CENTRAL_SERVER}dataSync/van-to-server

## Data download API, central
dataSyncDownloadUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van

## TC specialist slot booking, # not required
tcSpecialistSlotBook=${TM_API}schedule/bookSlot

## TC specialist slot cancelling, # not required
tcSpecialistSlotCancel=${TM_API}schedule/cancelBookedSlot

## benGenUrl, common, central
benGenUrlCentral=${COMMON_API_OPEN_SYNC}beneficiary/generateBeneficiaryIDs

## benImportUrl, identity, local
benImportUrlLocal=${IDENTITY_API_BASE_URL}id/saveGeneratedBenIDToLocalServer
mmucentralserver = ${MMU_CENTRAL_SERVER}common/get/Case-sheet/centralServerTMCaseSheet

tmCentralServer = ${TM_CENTRAL_SERVER}common/get/Case-sheet/printData

specialistSign=${COMMON_API}signature1/getSignClass

## inventory transaction download URL, central, mmu
dataSyncTransactionDownloadUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van-transactional

## inventory transaction processed flag update URL, central, mmu
dataSyncProcessedFlagUpdate=${MMU_CENTRAL_SERVER}dataSync/updateProcessedFlagPostDownload


fileBasePath =${MMU_FILE_BASE_PATH}

## data sync batch size
BATCH_SIZE=30
snomedCTPageSize=10
nurseWL=7
docWL=7
pharmaWL=7
labWL=7
radioWL=7
oncoWL=7

## For File Sync
serverIP=${FILE_SYNC_SERVER_IP}
serverDomain=${FILE_SYNC_SERVER_DOMAIN}
serverUserName=${FILE_SYNC_SERVER_USERNAME}
serverPassword=${FILE_SYNC_SERVER_PASSWORD}
localFolderToSync=${LOCAL_FOLDER_TO_SYNC}
serverFolder=MMUSync
getServerCredentialURL=${MMU_API}fileSyncController/getServerCredential
tmReferCheckValue=TM
### Redis IP
spring.redis.host=${REDIS_HOST}

jwt.secret=${JWT_SECRET_KEY}


#ELK logging file name
logging.path=logs
logging.file.name=${MMU_API_LOGGING_FILE_NAME}

springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
# local env
# DB Connections
spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

## S3 storage for diagnostic documents pushed from a van
aws.s3.access-key=${AWS_S3_ACCESS_KEY}
aws.s3.secret-key=${AWS_S3_SECRET_KEY}
aws.s3.region=${AWS_S3_REGION}
diagnostic.documents.s3.bucket=${DIAGNOSTIC_DOCUMENTS_S3_BUCKET}

## Carestream URLs, local
carestreamOrderCreateURL=${COMMON_API}carestream/createOrder

## Identity - Common URLs
# Registration
registrationUrl =${COMMON_API}beneficiary/createBeneficiary

registrarQuickSearchByIdUrl =${COMMON_API}beneficiary/searchUserByID

registrarQuickSearchByPhoneNoUrl =${COMMON_API}beneficiary/searchUserByPhone

getBenImageFromIdentity =${IDENTITY_API_BASE_URL}id/benImageByBenRegID

beneficiaryEditUrl =${COMMON_API}beneficiary/updateBenefciaryDetails

registrarAdvanceSearchUrl =${COMMON_API}beneficiary/searchBeneficiary

## Data Sync API, central
dataSyncUploadUrl=${MMU_CENTRAL_SERVER}dataSync/van-to-server

## Data download API, central
dataSyncDownloadUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van

## Diagnostic document push (this server -> further central server)
diagnosticDocumentUploadUrl=${MMU_CENTRAL_SERVER}dataSync/diagnostic-documents
diagnosticDocument.push.batchSize=${DIAGNOSTIC_DOCUMENT_PUSH_BATCH_SIZE}
diagnostic.documents.storage-root=${DIAGNOSTIC_DOCUMENTS_STORAGE_ROOT}

## TC specialist slot booking, # not required
tcSpecialistSlotBook=${TM_API}schedule/bookSlot

## TC specialist slot cancelling, # not required
tcSpecialistSlotCancel=${TM_API}schedule/cancelBookedSlot

## benGenUrl, common, central
benGenUrlCentral=${COMMON_API_OPEN_SYNC}beneficiary/generateBeneficiaryIDs

## benImportUrl, identity, local
benImportUrlLocal=${IDENTITY_API_BASE_URL}id/saveGeneratedBenIDToLocalServer
mmucentralserver = ${MMU_CENTRAL_SERVER}common/get/Case-sheet/centralServerTMCaseSheet

tmCentralServer = ${TM_CENTRAL_SERVER}common/get/Case-sheet/printData

specialistSign=${COMMON_API}signature1/getSignClass

## inventory transaction download URL, central, mmu
dataSyncTransactionDownloadUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van-transactional

## inventory transaction processed flag update URL, central, mmu
dataSyncProcessedFlagUpdate=${MMU_CENTRAL_SERVER}dataSync/updateProcessedFlagPostDownload

## down-sync (central -> local) data API, central, mmu
downSyncDataUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van-downsync

## down-sync (central -> local) flag update API, central, mmu
downSyncFlagUpdateUrl=${MMU_CENTRAL_SERVER}dataSync/updateDownSyncFlagPostDownload

## mark an up-synced record as already delivered to the van (central only)
downSync.markDeliveredOnUpSync=true


fileBasePath =${MMU_FILE_BASE_PATH}

## data sync batch size
BATCH_SIZE=30
snomedCTPageSize=10
nurseWL=7
docWL=7
pharmaWL=7
labWL=7
radioWL=7
oncoWL=7

## For File Sync
serverIP=${FILE_SYNC_SERVER_IP}
serverDomain=${FILE_SYNC_SERVER_DOMAIN}
serverUserName=${FILE_SYNC_SERVER_USERNAME}
serverPassword=${FILE_SYNC_SERVER_PASSWORD}
localFolderToSync=${LOCAL_FOLDER_TO_SYNC}
serverFolder=MMUSync
getServerCredentialURL=${MMU_API}fileSyncController/getServerCredential
tmReferCheckValue=TM
### Redis IP
spring.redis.host=${REDIS_HOST}

jwt.secret=${JWT_SECRET_KEY}


#ELK logging file name
logging.path=logs
logging.file.name=${MMU_API_LOGGING_FILE_NAME}

springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}
19 changes: 19 additions & 0 deletions src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ spring.datasource.username=<Enter your AMRIT DB username>
spring.datasource.password=<Enter your AMRIT DB password>
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

## S3 storage for diagnostic documents pushed from a van (POST /dataSync/diagnostic-documents)
aws.s3.access-key=<Enter your AWS access key here>
aws.s3.secret-key=<Enter your AWS secret key here>
aws.s3.region=ap-south-1
diagnostic.documents.s3.bucket=<Enter your private bucket name here>

## Carestream URLs, local
#carestreamOrderCreateURL =http://localhost:1040/carestream/createOrder
carestreamOrderCreateURL =http://localhost:8083/carestream/createOrder
Expand Down Expand Up @@ -44,6 +50,10 @@ dataSyncUploadUrl=http://10.208.122.38:8080/mmu-api/dataSync/van-to-server
#dataSyncDownloadUrl=http://localhost:82/dataSync/server-to-van
dataSyncDownloadUrl=http://10.208.122.38:8080/mmu-api/dataSync/server-to-van

diagnosticDocumentUploadUrl=http://localhost:8087/mmu-api/dataSync/diagnostic-documents
diagnosticDocument.push.batchSize=3
diagnostic.documents.storage-root=<Enter your diagnostic documents storage root path here>

## TC specialist slot booking, # not required
#tcSpecialistSlotBook=http://localhost:8080/schedule/bookSlot
tcSpecialistSlotBook=http://10.208.122.38:8080/tm-api/schedule/bookSlot
Expand All @@ -64,6 +74,15 @@ dataSyncTransactionDownloadUrl=http://10.208.122.38:8080/mmu-api/dataSync/server
## inventory transaction processed flag update URL, central, mmu
dataSyncProcessedFlagUpdate=http://10.208.122.38:8080/mmu-api/dataSync/updateProcessedFlagPostDownload

## down-sync (central -> local) data API, central, mmu
downSyncDataUrl=http://10.208.122.38:8080/mmu-api/dataSync/server-to-van-downsync

## down-sync (central -> local) flag update API, central, mmu
downSyncFlagUpdateUrl=http://10.208.122.38:8080/mmu-api/dataSync/updateDownSyncFlagPostDownload

## mark an up-synced record as already delivered to the van (central only)
downSync.markDeliveredOnUpSync=true

## fetching the TM case sheet for MMU.
mmucentralserver = <Enter your socket address here>/mmu-api/common/get/Case-sheet/centralServerTMCaseSheet

Expand Down
42 changes: 42 additions & 0 deletions src/main/java/com/iemr/mmu/config/S3ClientConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package com.iemr.mmu.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.presigner.S3Presigner;

/***
* @purpose S3 client beans used to store diagnostic documents pushed from a van. Built
* once and shared, rather than re-built per request.
*/
@Configuration
public class S3ClientConfig {

@Value("${aws.s3.access-key}")
private String accessKey;

@Value("${aws.s3.secret-key}")
private String secretKey;

@Value("${aws.s3.region}")
private String region;

private StaticCredentialsProvider credentialsProvider() {
return StaticCredentialsProvider.create(AwsBasicCredentials.create(accessKey, secretKey));
}

@Bean
public S3Client diagnosticDocumentS3Client() {
return S3Client.builder().region(Region.of(region)).credentialsProvider(credentialsProvider()).build();
}

@Bean
public S3Presigner diagnosticDocumentS3Presigner() {
return S3Presigner.builder().region(Region.of(region)).credentialsProvider(credentialsProvider()).build();
}
}
Loading