Page 1 of 1

Death Witness Role - Doctor

Posted: 24 Jan 2020 08:44
by ColinMc
Is there something special about the Death Witness Role for Doctor.

I've started with the following code

{individual} died <of a {cause},> {date} <at {address}> {place} {age}.< {individual's} doctor was {role=doctor}. >

This generates a sentence error as follows
Death dr 1.jpg
Death dr 1.jpg (23.91 KiB) Viewed 3736 times
If I then change to {individual}, I get a similar error
Death dr 2.jpg
Death dr 2.jpg (18.13 KiB) Viewed 3736 times
However changing to {his/her} gives me a different error, "her" appears as expected, the Doctor Role is now in error, but the <> symbols are not showing
Death dr 3.jpg
Death dr 3.jpg (21.22 KiB) Viewed 3736 times
Finally removing that first code completely (as in) < doctor was {role=doctor}. >, this works correctly, giving me "doctor was Dr Mason"

I've also tried

adding a word before the problem template code
deleting all the later entries for minister etc (which had all worked fine)
Removing the first {individual} code
{individual/him/her} (same error as {him/her}

but none of these made any difference

So am I doing something wrong? I cannot see anything in the forum/KB.

Re: Death Witness Role - Doctor

Posted: 24 Jan 2020 08:48
by ColinMc
My next test was to simplify the whole thing, and start with <{individual's}> on its own. That worked. I then added {role=doctor}. That worked. I then copied and pasted both working codes, removed the middle <> and I get an error.
Death dr 6.jpg
Death dr 6.jpg (58.64 KiB) Viewed 3735 times
Death dr 7.jpg
Death dr 7.jpg (9.59 KiB) Viewed 3735 times

Re: Death Witness Role - Doctor

Posted: 24 Jan 2020 09:05
by Jane
It seems to be a limitation of using another individual format code with in a single section.

Code: Select all

{individual} died <of {cause}> {date} <{address},>{_place}  {age}.  
<  The attending doctor was {role(single)=doctor}.>
works OK as a work around.

Re: Death Witness Role - Doctor

Posted: 24 Jan 2020 09:27
by ColinMc
It has to be more than that. I had already tried removing the first {individual}. as that was my suspicion

But, if you take the bare bones example in my second post, if I remove the first code, I still get an error.

Re: Death Witness Role - Doctor

Posted: 24 Jan 2020 10:39
by tatewise
The restriction is that you cannot have two {codes} within one <angle bracket>.
The first (or maybe the last) {code} determines whether to include the <angle bracket> contents or not, and other {codes} are treated as plain text prefix or suffix.

So if one {code} is any of the {individual...} codes then they always return a value, so they unconditionally include the <angle bracket> contents and everything before or after that {code} is plain text prefix or suffix.

Re: Death Witness Role - Doctor

Posted: 24 Jan 2020 12:02
by ColinMc
OK that makes sense now. Thanks