{%- macro id_node(id) -%}
    {%- if ',' in id|string() -%}
    <ScreenCell>{{ id }}</ScreenCell>
    {%- else -%}
    <ItemNumber>{{ id }}</ItemNumber>
    {%- endif -%}
{%- endmacro -%}

{%- macro emit_user_info(user_info) -%}
    {%- if user_info %}
    <AccountMaintenance>
        <AccountDetail>
            <AccountNumber>{{ user_info.account_number or '' }}</AccountNumber>
            <LastName>{{ user_info.last_name|e or '' }}</LastName>
            <FirstName>{{ user_info.first_name|e or '' }}</FirstName>
            <MiddleInitial>{{ user_info.middle_initial|e or '' }}</MiddleInitial>
            {%- if user_info.address %}
            <Address1>{{ user_info.address.street1|e or '' }}</Address1>
            <Address2>{{ user_info.address.street2|e or '' }}</Address2>
            <Address3>{{ user_info.address.street3|e or '' }}</Address3>
            <City>{{ user_info.address.city|e or '' }}</City>
            <State>{{ user_info.address.state|e or '' }}</State>
            <Zip>{{ user_info.address.zip|e or '' }}</Zip>
            {%- endif %}
            <Phone>{{ user_info.phone or '' }}</Phone>
            <PhoneExt>{{ user_info.phone_ext or '' }}</PhoneExt>
        </AccountDetail>
    </AccountMaintenance>
    {%- endif %}
{%- endmacro -%}
