Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added audit service changes in persister configs for health - unified uat #2942

Open
wants to merge 1 commit into
base: UNIFIED-UAT
Choose a base branch
from
Open
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions health/egov-persister/facility-persister.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ serviceMaps:
description: Saves a facility
fromTopic: save-facility-health-topic
isTransaction: true
isAuditEnabled: true
module: FACILITY
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: INSERT INTO health.FACILITY(id, clientReferenceId, tenantId, isPermanent, name, usage, storageCapacity, addressId, additionalDetails, createdBy, createdTime, lastModifiedBy, lastModifiedTime, rowVersion, isDeleted) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
basePath: $.*
Expand Down Expand Up @@ -51,6 +58,13 @@ serviceMaps:
description: Updates a facility
fromTopic: update-facility-health-topic
isTransaction: true
isAuditEnabled: true
module: FACILITY
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.FACILITY SET tenantId=?, clientReferenceId=?, isPermanent=?, name=?, usage=?, storageCapacity=?, addressId=?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=? WHERE id=? AND isDeleted=false;
basePath: $.*
Expand Down Expand Up @@ -109,6 +123,13 @@ serviceMaps:
description: Deletes a facility
fromTopic: delete-facility-health-topic
isTransaction: true
isAuditEnabled: true
module: FACILITY
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.FACILITY SET lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=?, additionalDetails=? WHERE id=?;
basePath: $.*
Expand Down
42 changes: 42 additions & 0 deletions health/egov-persister/household-persister.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ serviceMaps:
description: Persists household.
fromTopic: save-household-health-topic
isTransaction: true
isAuditEnabled: true
module: HOUSEHOLD
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: INSERT INTO health.HOUSEHOLD(id, tenantId, clientReferenceId, numberOfMembers, addressId, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted, clientCreatedTime, clientLastModifiedTime, clientCreatedBy, clientLastModifiedBy) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
basePath: $.*
Expand Down Expand Up @@ -51,6 +58,13 @@ serviceMaps:
description: Updates household.
fromTopic: update-household-health-topic
isTransaction: true
isAuditEnabled: true
module: HOUSEHOLD
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.HOUSEHOLD SET tenantId = ?, clientReferenceId = ?, numberOfMembers = ?, addressId = ?, additionalDetails = ?, lastModifiedBy = ?, lastModifiedTime = ?, rowVersion = ?, isDeleted = ?, clientLastModifiedTime = ?, clientLastModifiedBy = ? WHERE ID = ?;
basePath: $.*
Expand Down Expand Up @@ -107,6 +121,13 @@ serviceMaps:
description: Deletes household.
fromTopic: delete-household-health-topic
isTransaction: true
isAuditEnabled: true
module: HOUSEHOLD
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.HOUSEHOLD SET lastModifiedBy = ?, lastModifiedTime = ?, clientLastModifiedTime = ?, clientLastModifiedBy = ?, rowVersion = ?, isDeleted = ?, additionalDetails=? WHERE ID = ?;
basePath: $.*
Expand All @@ -126,6 +147,13 @@ serviceMaps:
description: Persists household member.
fromTopic: save-household-health-member-topic
isTransaction: true
isAuditEnabled: true
module: HOUSEHOLD
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: INSERT INTO health.HOUSEHOLD_MEMBER(id, tenantId, clientReferenceId, individualId, individualClientReferenceId, householdId, householdClientReferenceId, isHeadOfHousehold, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted, clientCreatedTime, clientLastModifiedTime, clientCreatedBy, clientLastModifiedBy) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
basePath: $.*
Expand Down Expand Up @@ -155,6 +183,13 @@ serviceMaps:
description: Update household member.
fromTopic: update-household-health-member-topic
isTransaction: true
isAuditEnabled: true
module: HOUSEHOLD
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.HOUSEHOLD_MEMBER SET isHeadOfHousehold=?, clientReferenceId = ?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, isDeleted=?, clientLastModifiedTime = ?, clientLastModifiedBy = ? WHERE individualId=? AND householdId=? AND isDeleted=false;
basePath: $.*
Expand All @@ -176,6 +211,13 @@ serviceMaps:
description: Deletes household Member.
fromTopic: delete-household-health-member-topic
isTransaction: true
isAuditEnabled: true
module: HOUSEHOLD
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.HOUSEHOLD_MEMBER SET lastModifiedBy = ?, lastModifiedTime = ?, clientLastModifiedTime = ?, clientLastModifiedBy = ?, rowVersion = ?, isDeleted = ?, additionalDetails=? WHERE ID = ?;
basePath: $.*
Expand Down
21 changes: 21 additions & 0 deletions health/egov-persister/individual-persister.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ serviceMaps:
description: Updates Individual
fromTopic: update-individual-health-topic
isTransaction: true
isAuditEnabled: true
module: INDIVIDUAL
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.individual SET userId=?, userUuid=?, tenantId=?, givenName=?, familyName=?, otherNames=?, dateOfBirth=?, Gender=?, bloodGroup=?, mobileNumber=?, altContactNumber=?, email=?, fatherName=?, husbandName=?, relationship=?, photo=?, isSystemUserActive=?, additionalDetails=?, lastModifiedBy=?, lastModifiedTime=?, rowVersion=?, username = ?, password = ?, type = ?, roles = ?, clientLastModifiedTime = ?, clientLastModifiedBy = ? WHERE id=? AND isDeleted=false;
basePath: $.*
Expand Down Expand Up @@ -246,6 +253,13 @@ serviceMaps:
description: Deletes Individual and related Entities
fromTopic: delete-individual-health-topic
isTransaction: true
isAuditEnabled: true
module: INDIVIDUAL
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.individual SET lastModifiedBy=?, clientLastModifiedTime = ?, clientLastModifiedBy = ?, lastModifiedTime=?, rowVersion=?, isDeleted=?, isSystemUserActive=? WHERE id=?;
basePath: $.*
Expand Down Expand Up @@ -285,6 +299,13 @@ serviceMaps:
description: Updates userId and userUuid received from user-service into an individual
fromTopic: update-user-id-health-topic
isTransaction: true
isAuditEnabled: true
module: INDIVIDUAL
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.clientReferenceId
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.individual SET userId=?, userUuid=? WHERE id=?;
basePath: $.*
Expand Down
28 changes: 28 additions & 0 deletions health/egov-persister/product-persister.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ serviceMaps:
description: Persists Product
fromTopic: save-product-health-topic
isTransaction: true
isAuditEnabled: true
module: PRODUCT
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.id
auditAttributeBasePath: $.*
queryMaps:
- query: INSERT INTO health.product(id, tenantId, type, name, manufacturer, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
basePath: $.*
Expand All @@ -28,6 +35,13 @@ serviceMaps:
description: Updates Product
fromTopic: update-product-health-topic
isTransaction: true
isAuditEnabled: true
module: PRODUCT
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.id
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.product SET tenantId = ?, type = ?, name = ?, manufacturer = ?, additionalDetails = ?, lastModifiedBy = ?, lastModifiedTime = ?, rowVersion = ?, isDeleted = ? WHERE id = ?
basePath: $.*
Expand All @@ -49,6 +63,13 @@ serviceMaps:
description: Saves a product variant
fromTopic: save-product-variant-health-topic
isTransaction: true
isAuditEnabled: true
module: PRODUCT
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.id
auditAttributeBasePath: $.*
queryMaps:
- query: INSERT INTO health.product_variant(id, tenantId, productId, sku, variation, additionalDetails, createdBy, lastModifiedBy, createdTime, lastModifiedTime, rowVersion, isDeleted) VALUES (?,?,?,?,?,?,?,?,?,?,?,?);
basePath: $.*
Expand All @@ -72,6 +93,13 @@ serviceMaps:
description: Updates a product variant
fromTopic: update-product-variant-health-topic
isTransaction: true
isAuditEnabled: true
module: PRODUCT
objecIdJsonPath: $.id
tenantIdJsonPath: $.tenantId
userUuidJsonPath: $.[0].auditDetails.createdBy
transactionCodeJsonPath: $.id
auditAttributeBasePath: $.*
queryMaps:
- query: UPDATE health.product_variant SET tenantId = ?, productId = ?, sku = ?, variation = ?, additionalDetails = ?, lastModifiedBy = ?, lastModifiedTime = ?, rowVersion = ?, isDeleted = ? WHERE id = ?;
basePath: $.*
Expand Down
Loading