Skip to content

Adding api's for syncing diagnostic documents to s3 - #183

Open
sehjotsinghunthinkable wants to merge 61 commits into
PSMRI:release-3.8.4from
sehjotsinghunthinkable:feature/diagnostic-document-sync
Open

Adding api's for syncing diagnostic documents to s3#183
sehjotsinghunthinkable wants to merge 61 commits into
PSMRI:release-3.8.4from
sehjotsinghunthinkable:feature/diagnostic-document-sync

Conversation

@sehjotsinghunthinkable

Copy link
Copy Markdown

📋 Description

JIRA ID: STOP-345

  • New feature (non-breaking change which adds functionality)

vanitha1822 and others added 30 commits July 14, 2026 16:09
Add User Details for Clinical Staff in t_visitdetails When a Patient Visits the Facility
Implement Backend Support for Downsync Process
String query = " UPDATE " + validSchema + "." + validTable + " SET CentralID = ? WHERE " + validPkColumn
+ " = ? AND CentralID IS NULL ";

return jdbcTemplate.update(query, centralID, localID);

String query = " UPDATE " + validSchema + "." + validTable + " SET VanSerialNo = ? WHERE "
+ validPkColumn + " = ? ";
return jdbcTemplate.update(query, localID, localID);

String query = " SELECT COUNT(*) FROM " + validSchema + "." + validTable
+ " WHERE VanID = ? AND Processed = 'F' AND SyncFailureReason = 'CONFLICT' ";
Integer count = jdbcTemplate.queryForObject(query, Integer.class, vanID);
+ " SET Processed = 'F', SyncFailureReason = 'CONFLICT',"
+ " DownSynced = 'F', DownSyncFailureReason = 'CONFLICT' WHERE " + validPkColumn
+ " = ? ";
return jdbcTemplate.update(query, localID);
return resultSetList;
}

public int updateDownSyncFlagPostDownload(String schema, String table, String pkColumnName,
String query = " UPDATE " + validSchema + "." + validTable
+ " SET DownSynced = 'P', DownSyncDate = now(), DownSyncFailureReason = NULL " + holdLastModDate
+ " WHERE " + validPkColumn + " = ? ";
updatedRows += countUpdatedRows(jdbcTemplate.batchUpdate(query, successWithoutSerialNo));
String query = " UPDATE " + validSchema + "." + validTable
+ " SET DownSynced = 'U', DownSyncFailureReason = ? " + holdLastModDate + " WHERE " + validPkColumn
+ " = ? ";
updatedRows += countUpdatedRows(jdbcTemplate.batchUpdate(query, retryable));
String query = " UPDATE " + validSchema + "." + validTable
+ " SET DownSynced = 'F', DownSyncFailureReason = ? " + holdLastModDate + " WHERE " + validPkColumn
+ " = ? ";
updatedRows += countUpdatedRows(jdbcTemplate.batchUpdate(query, failed));
records.size(), updatedRows);
return updatedRows;
}

int count = 0;
if (batchResult != null) {
for (int rows : batchResult) {
if (rows > 0)

public String decrypt(String encryptedValue) {
try {
SecretKey secretKey = new SecretKeySpec(SECRET_KEY.getBytes(StandardCharsets.UTF_8), ALGORITHM);
public String decrypt(String encryptedValue) {
try {
SecretKey secretKey = new SecretKeySpec(SECRET_KEY.getBytes(StandardCharsets.UTF_8), ALGORITHM);
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants