I am trying to come up with a program rule that will generate an automatic UIC based on the variables captured.Here is what i want to the system to generate the UIC from: A.CLIENT DEMOGRAPHICS
First name | Stanley |
---|---|
Last name | Kalyati |
Mothers Firstname | Jeniffer |
Mothers Surname | Kalyati |
DoB | YearsMonthsDays |
Gender | F |
Are you a Twin | No Twin, First_Twin,Second_Twin |
District of Birth | Lilongwe |
Last 2 letters of mothers first name
Last 2 letters of AGYW surname
Last letters of district of birth name
Birthday 120500 (12 for day, 05 for month and 00 for year of birth)
Gender (F)
0 if she has No Twin
1 if she is the First_Twin
2 if she the Second_Twin
I.e ERTIWE120500F0
And now this is the code that i have come up with.Anyone to analyse and help me here: d2:concatenate(
d2:substring(#{DL_Mothers Firstname}, d2:length(#{DL_Mothers Firstname}) - 2, 2),
d2:substring(#{DL_Mothers Surname}, d2:length(#{DL_Mothers Surname}) - 2, 2),
d2:substring(#{DL_District of Birth}, d2:length(#{DL_District of Birth}) - 1, 1),
d2:substring(#{DL_DoB}, 8, 2), // Day
d2:substring(#{DL_DoB}, 5, 2), // Month
d2:substring(#{DL_DoB}, 2, 2), // Year
#{DL_Gender},
#{DL_Are you a Twin}
)
Anyone to help me,i will certainly appreciate.