Adding api's for syncing diagnostic documents to s3 - #183
Open
sehjotsinghunthinkable wants to merge 61 commits into
Open
Adding api's for syncing diagnostic documents to s3#183sehjotsinghunthinkable wants to merge 61 commits into
sehjotsinghunthinkable wants to merge 61 commits into
Conversation
Add User Details for Clinical Staff in t_visitdetails When a Patient Visits the Facility
…_downsync # Conflicts: # pom.xml
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"); |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




📋 Description
JIRA ID: STOP-345