-
Notifications
You must be signed in to change notification settings - Fork 170
Add btr-persister.yml for birth module #3717
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| serviceMaps: | ||
| serviceName: btr-services | ||
| mappings: | ||
| - version: 1.0 | ||
| description: Persists birth details in tables | ||
| fromTopic: save-bt-application | ||
| isTransaction: true | ||
| queryMaps: | ||
|
|
||
| - query: INSERT INTO eg_bt_registration(id,tenantid,applicationnumber,babyfirstname,babylastname,fatherid,motherid,doctorname,hospitalname,placeofbirth,timeofbirth,createdby,lastmodifiedby,createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?); | ||
| basePath: BirthRegistrationApplications.* | ||
| jsonMaps: | ||
| - jsonPath: $.BirthRegistrationApplications.*.id | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.tenantId | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.applicationNumber | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.babyFirstName | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.babyLastName | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.fatherOfApplicant.id | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.motherOfApplicant.id | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.doctorName | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.hospitalName | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.placeOfBirth | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.timeOfBirth | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.auditDetails.createdBy | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.auditDetails.lastModifiedBy | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.auditDetails.createdTime | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.auditDetails.lastModifiedTime | ||
|
|
||
| - query: INSERT INTO eg_bt_address(id, tenantid, doorno, latitude, longitude, buildingname, addressid, addressnumber, type, addressline1, addressline2, landmark, street, city, locality, pincode, detail, registrationid, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); | ||
| basePath: BirthRegistrationApplications.* | ||
| jsonMaps: | ||
| - jsonPath: $.BirthRegistrationApplications.*.address.id | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.tenantId | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.doorNo | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.latitude | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.longitude | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.buildingName | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.addressId | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.addressNumber | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.type | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.addressLine1 | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.addressLine2 | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.landmark | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.street | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.city | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.locality.name | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.pincode | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.detail | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.id | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.createdBy | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.lastModifiedBy | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.createdTime | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.address.lastModifiedTime | ||
|
Comment on lines
+82
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address audit fields mapped from address.*; likely should use application auditDetails. Typical eGov payloads carry auditDetails at the root object, and child entities reuse those values. Using Apply this diff to source the audit fields from the application’s auditDetails: - - jsonPath: $.BirthRegistrationApplications.*.address.createdBy
- - jsonPath: $.BirthRegistrationApplications.*.address.lastModifiedBy
- - jsonPath: $.BirthRegistrationApplications.*.address.createdTime
- - jsonPath: $.BirthRegistrationApplications.*.address.lastModifiedTime
+ - jsonPath: $.BirthRegistrationApplications.*.auditDetails.createdBy
+ - jsonPath: $.BirthRegistrationApplications.*.auditDetails.lastModifiedBy
+ - jsonPath: $.BirthRegistrationApplications.*.auditDetails.createdTime
+ - jsonPath: $.BirthRegistrationApplications.*.auditDetails.lastModifiedTime |
||
|
|
||
| - version: 1.0 | ||
| description: Update birth registration applications in table | ||
| fromTopic: update-bt-application | ||
| isTransaction: true | ||
| queryMaps: | ||
| - query: UPDATE eg_bt_registration SET tenantid = ?,babyFirstName = ?, timeOfBirth = ? WHERE id=?; | ||
| basePath: BirthRegistrationApplications.* | ||
| jsonMaps: | ||
| - jsonPath: $.BirthRegistrationApplications.*.tenantId | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.babyFirstName | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.timeOfBirth | ||
|
|
||
| - jsonPath: $.BirthRegistrationApplications.*.id | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YAML syntax error: tab character present.
YAML does not allow tabs. This line has a tab at the end, causing a parser error (see YAMLlint).
Apply this diff to remove the tab:
📝 Committable suggestion
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 7-7: syntax error: found character '\t' that cannot start any token
(syntax)
🤖 Prompt for AI Agents