Skipping based on date of birth

Hi,

I am trying to create the form with these questions:
type- label- appearance
integer -Date of birth-month- year
select_one sex -Sex
select_one YesNO-Pregnant

I want the Pregnant question only appear for female who is born after Jan 2004, is there any suggestion on this? if I do not want to calculate age?
I understand that even the enumerator will see only mm/YYYY, but the data store with date 01/mm/YYYY

And also can I constraint the Date of birth to be not after June 2021.

Thanks for your suggestion

Hi

Just that I found the answer from other post

So for example : I want to limit the date of birth to be after Jan 1920 and before June 2021 , ln calculation use :::: .>= date(β€˜1920-01-01’) and .<=date(β€˜2021-06-01’)

For question Pregnant to only appear for Female and Born after Jan 2004
in relevant I did : ${sex}=1 and ${DOB}<= date(β€˜2004-01-01’)

DOB - is the date of birth obtained
and sex has two variable 1- female , 2 male

Hope this helps others,

2 Likes

Welcome back to the community, @Okard! Thank you also for sharing the solution to the entire community.

Thanks. Maybe a content hint? Our experience is that is might be preferable:

  • to allow β€œdon’t know” (refusal) for pregnancy questions
  • treat unexact birthdat/year entries, for ex. by using a broader filter during data collection and sharpen the filter during analysis.
2 Likes

Thanks . that is good suggestion

1 Like

Thanks for sharing the solution, I was just looking for this validation.

1 Like