{%- 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 or '' }}</LastName>
            <FirstName>{{ user_info.first_name or '' }}</FirstName>
            <MiddleInitial>{{ user_info.middle_initial or '' }}</MiddleInitial>
            {%- if user_info.address %}
            <Address1>{{ user_info.address.street1 or '' }}</Address1>
            <Address2>{{ user_info.address.street2 or '' }}</Address2>
            <Address3>{{ user_info.address.street3 or '' }}</Address3>
            <City>{{ user_info.address.city or '' }}</City>
            <State>{{ user_info.address.state or '' }}</State>
            <Zip>{{ user_info.address.zip or '' }}</Zip>
            {%- endif %}
            <Phone>{{ user_info.phone or '' }}</Phone>
            <PhoneExt>{{ user_info.phone_ext or '' }}</PhoneExt>
        </AccountDetail>
    </AccountMaintenance>
    {%- endif %}
{%- endmacro -%}
