File tree Expand file tree Collapse file tree 1 file changed +44
-1
lines changed
v1-to-v2-data-migration/helpers Expand file tree Collapse file tree 1 file changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -144,4 +144,47 @@ export const VERIFIED_MAPPINGS : Record<
144144 'death.spouse.verified' : ( data : string ) => ( {
145145 'spouse.verified' : data === '' ? undefined : data ,
146146 } ) ,
147- }
147+ }
148+
149+ export const AGE_MAPPINGS : Record <
150+ string ,
151+ ( data : string ) => Record < string , any >
152+ > = {
153+ 'birth.mother.ageOfIndividualInYears' : ( data : string ) => ( {
154+ 'mother.age' : {
155+ age : data ,
156+ asOfDateRef : 'child.dob' ,
157+ } ,
158+ } ) ,
159+ 'birth.father.ageOfIndividualInYears' : ( data : string ) => ( {
160+ 'father.age' : {
161+ age : data ,
162+ asOfDateRef : 'child.dob' ,
163+ } ,
164+ } ) ,
165+ 'birth.informant.ageOfIndividualInYears' : ( data : string ) => ( {
166+ 'informant.age' : {
167+ age : data ,
168+ asOfDateRef : 'child.dob' ,
169+ } ,
170+ } ) ,
171+ 'death.deceased.ageOfIndividualInYears' : ( data : string ) => ( {
172+ 'deceased.age' : {
173+ age : data ,
174+ asOfDateRef : 'eventDetails.date' ,
175+ } ,
176+ } ) ,
177+ 'death.informant.ageOfIndividualInYears' : ( data : string ) => ( {
178+ 'informant.age' : {
179+ age : data ,
180+ asOfDateRef : 'eventDetails.date' ,
181+ } ,
182+ } ) ,
183+ 'death.spouse.ageOfIndividualInYears' : ( data : string ) => ( {
184+ 'spouse.age' : {
185+ age : data ,
186+ asOfDateRef : 'eventDetails.date' ,
187+ } ,
188+ } ) ,
189+ }
190+
You can’t perform that action at this time.
0 commit comments