Page 1 of 1

Query to identify Stillbirths

Posted: 20 Apr 2023 16:32
by AdrianBruce
If I use the "Age" facility against the Birth event and enter "Stillborn", I can see on the All tab that the Age (under the Birth event) contains "Stillborn".

How can I use that in a query to identify children who have been stillborn?

If I try to test %INDI.BIRT[1].AGE% for equals "Stillborn", it turns it into a test for equals zero. But that doesn't work when I try to use a single filter of Add if %INDI.BIRT[1].AGE% equals 0, because I don't see any of the 3 individuals that I know to be stillborn and marked as such. In fact, I don't see anyone in the results set.


Slightly confused here... :?

Re: Query to identify Stillbirths

Posted: 20 Apr 2023 20:00
by tatewise
Yes, the Query is not very helpful and you have to think outside the box and use the equals operator.

=IsTrue( %INDI.BIRT.AGE% = "Stillborn" )

i.e. Add if =IsTrue( %INDI.BIRT.AGE% = "Stillborn" ) is true

Re: Query to identify Stillbirths

Posted: 20 Apr 2023 20:21
by AdrianBruce
Thanks very much for that Mike. Works fine.

It sort of looks to me like that coding is getting to the %INDI.BIRT.AGE% before the clever stuff turns "Stillborn" into zero - I found =AgeAt(%INDI%,%INDI.BIRT.DATE%) gave an answer of zero for the three that I knew of.

Re: Query to identify Stillbirths

Posted: 20 Apr 2023 20:48
by tatewise
Adrian, you are overthinking it.
There is no clever stuff ~ the Age value really is "Stillborn" and remains as "STILLBORN" in the GEDCOM.
i.e.
1 BIRT
2 AGE STILLBORN

=AgeAt(%INDI%,%INDI.BIRT.DATE%) returns 0 for everybody.