{assign var=i value=1} {foreach $allobsteric as $data} {if $data->obstermination == 1 || $data->obstermination == 2} {if $data->outcomeid eq 2 || $data->outcomeid eq 3} {/if} {if $data->outcomeid eq 3} {/if} {else} {/if} {capture assign=i}{$i+1}{/capture} {/foreach}
# Duration Termination Place Date Type OutCome Gender Baby Weight Baby Name Notes
outcomeid eq 2}rowspan="2" {elseif $data->outcomeid eq 3} rowspan="3" {/if} > {$i} outcomeid eq 2}rowspan="2" {elseif $data->outcomeid eq 3} rowspan="3" {/if} >{$data->obstrduration} outcomeid eq 2}rowspan="2" {elseif $data->outcomeid eq 3} rowspan="3" {/if} >{if !empty($data->terminatename)}{$data->terminatename}{/if} outcomeid eq 2}rowspan="2" {elseif $data->outcomeid eq 3} rowspan="3" {/if} >{if !empty($data->placename)}{$data->placename}{/if} outcomeid eq 2}rowspan="2" {elseif $data->outcomeid eq 3} rowspan="3" {/if} >{$data->obsdate} outcomeid eq 2}rowspan="2" {elseif $data->outcomeid eq 3} rowspan="3" {/if} > {if $data->outcomeid eq 0}Male {/if} {if $data->outcomeid eq 1}Female {/if} {if $data->outcomeid eq 2}Twins {/if} {if $data->outcomeid eq 3}Triplets {/if} {if {$data->babytype} eq 0}Living {/if} {if {$data->babytype} eq 1}Dead {/if} {if {$data->babygendernew} eq 0}M {/if} {if {$data->babygendernew} eq 1}F {/if} {$data->babyweight} {$data->babyname} outcomeid eq 2}rowspan="2"{elseif $data->outcomeid eq 3}rowspan="3"{/if}>{$data->obsnote}
{if {$data->babytype1} eq 0}Living {/if} {if {$data->babytype1} eq 1}Dead {/if} {if {$data->babygendernew1} eq 0}M {/if} {if {$data->babygendernew1} eq 1}F {/if} {$data->babyweight1} {$data->babyname1}
{if {$data->babytype2} eq 0}Living {/if} {if {$data->babytype2} eq 1}Dead {/if} {if {$data->babygendernew2} eq 0}M {/if} {if {$data->babygendernew2} eq 1}F {/if} {$data->babyweight2} {$data->babyname2}
{$i} {if !empty($data->obstrduration)}{$data->obstrduration}{/if} {if !empty($data->terminatename)}{$data->terminatename}{/if} {if !empty($data->placename)}{$data->placename}{/if} {if !empty($data->obsdate)}{$data->obsdate}{/if} {$data->obsnote}