<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Group Patient IDs by Consecutive Date Ranges in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361088#M417143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempTable:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; START,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOS&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source_table&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;/* If START and END are text fields then first convert them to dates using the Date#() function:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(START, 'YYYY-MM-DD'),&lt;SPAN style="font-size: 13.3333px;"&gt;'YYYY-MM-DD'&lt;/SPAN&gt;) as START,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoNumber([Admission START], ID) as [Admission Number]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(START = Previous(END) + 1, Peek('&lt;SPAN style="font-size: 13.3333px;"&gt;Admission START&lt;/SPAN&gt;'), START) as [Admission START]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(START = Previous(END) + 1, LOS + Peek('Running Admission LOS'), LOS) as [Running Admission LOS]&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempTable&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; START,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 May 2017 18:01:18 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2017-05-03T18:01:18Z</dc:date>
    <item>
      <title>Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361087#M417142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;In the table below patient 001 has consecutive date ranges in the first three rows, so that should count as a single hospital admission (for which I would calculate a single total Length of Stay (LOS)=41). Rows 4 and 5 should be counted as a separate admission (another two consecutive date ranges), total LOS = 20 days. Person 002 in the last row has only one date range, which is counted as one admission with a LOS of 8.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;ID&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-left: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;START&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-left: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;END&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-left: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;LOS&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-top: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-08-24&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-08-31&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;7&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-top: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-09-01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-09-30&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;29&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-top: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-10-01&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-10-06&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-top: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-12-03&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-12-19&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;16&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-top: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;001&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-12-20&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-12-24&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border: dashed #bbbbbb 1.0pt; border-top: none; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;002&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-02-12&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;2016-02-20&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border-top: none; border-left: none; border-bottom: dashed #BBBBBB 1.0pt; border-right: dashed #BBBBBB 1.0pt; padding: 1.5pt 1.5pt 1.5pt 1.5pt;" valign="bottom"&gt;&lt;P style="margin-bottom: 1.5pt;"&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;8&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 16:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361087#M417142</guid>
      <dc:creator />
      <dc:date>2017-05-03T16:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361088#M417143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempTable:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; START,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOS&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source_table&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;/* If START and END are text fields then first convert them to dates using the Date#() function:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#(START, 'YYYY-MM-DD'),&lt;SPAN style="font-size: 13.3333px;"&gt;'YYYY-MM-DD'&lt;/SPAN&gt;) as START,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoNumber([Admission START], ID) as [Admission Number]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(START = Previous(END) + 1, Peek('&lt;SPAN style="font-size: 13.3333px;"&gt;Admission START&lt;/SPAN&gt;'), START) as [Admission START]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(START = Previous(END) + 1, LOS + Peek('Running Admission LOS'), LOS) as [Running Admission LOS]&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempTable&lt;/P&gt;&lt;P&gt;ORDER BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; START,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 18:01:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361088#M417143</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-05-03T18:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361089#M417144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this -&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162074_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 18:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361089#M417144</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-03T18:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361090#M417145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is far better than I proposed! I think ID check would be needed along with START date comparison, am I missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 18:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361090#M417145</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-03T18:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361091#M417146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! Currently working on implementing this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 19:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361091#M417146</guid>
      <dc:creator />
      <dc:date>2017-05-03T19:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361092#M417147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! I am currently trying to implement both proposed solutions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 19:17:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361092#M417147</guid>
      <dc:creator />
      <dc:date>2017-05-03T19:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Group Patient IDs by Consecutive Date Ranges</title>
      <link>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361093#M417148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another solution might be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="162101" alt="QlikCommunity_Thread_259171_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/162101_QlikCommunity_Thread_259171_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="162102" alt="QlikCommunity_Thread_259171_Pic2.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/162102_QlikCommunity_Thread_259171_Pic2.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="162103" alt="QlikCommunity_Thread_259171_Pic3.JPG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/162103_QlikCommunity_Thread_259171_Pic3.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_259171_Pic7.JPG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/162107_QlikCommunity_Thread_259171_Pic7.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14938484581959561" jivemacro_uid="_14938484581959561"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; START,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END-START as LOS,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RecNo() as %Key&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A _jive_internal="true" data-containerid="2051" data-containertype="14" data-objectid="259171" data-objecttype="1" href="https://community.qlik.com/thread/259171"&gt;https://community.qlik.com/thread/259171&lt;/A&gt;&lt;SPAN&gt;] (html, codepage is 1252, embedded labels, table is @1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Join&lt;/P&gt;
&lt;P&gt;LOAD %Key,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeSum(Peek(admID),-(ID&amp;lt;&amp;gt;Previous(ID) or START&amp;lt;&amp;gt;Previous(END)+1)) as admID&lt;/P&gt;
&lt;P&gt;Resident table1&lt;/P&gt;
&lt;P&gt;Order By ID, START;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 May 2017 21:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-Patient-IDs-by-Consecutive-Date-Ranges/m-p/1361093#M417148</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-05-03T21:58:07Z</dc:date>
    </item>
  </channel>
</rss>

