<?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: Help with collapsing rows by identification number. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630032#M20790</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/315413"&gt;@blacklucas1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to the community!&lt;/P&gt;
&lt;P&gt;Could you please post sample data using datalines as well as the desired output?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Mar 2020 10:34:31 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-03-06T10:34:31Z</dc:date>
    <item>
      <title>Help with collapsing rows by identification number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630031#M20789</link>
      <description>&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Hi all - been struggling with this for a little bit and it seems incredibly simple. I've tried a simple left join but it didn't give me the results I was hoping for.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I have a dataset of hospitalizations containing patient identification numbers and various other characteristics.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;in the dataset, we have index events hospitalizations for a certain procedure + readmission hospitalizations. Thus, a specific patient ID number has 2 rows of data if they were readmitted (with the latter having readmission=1 and readmitdiagnosis. Values for these variables are null in the index hospitalization row.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;How can I collapse these rows so each patient just has one row containing all of their data + readmission, readmitdiagnosis from the latter line?&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Thank you in advance for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 10:27:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630031#M20789</guid>
      <dc:creator>blacklucas1</dc:creator>
      <dc:date>2020-03-06T10:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with collapsing rows by identification number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630032#M20790</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/315413"&gt;@blacklucas1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Welcome to the community!&lt;/P&gt;
&lt;P&gt;Could you please post sample data using datalines as well as the desired output?&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 10:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630032#M20790</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-03-06T10:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with collapsing rows by identification number.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630138#M20796</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/315413"&gt;@blacklucas1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Hi all - been struggling with this for a little bit and it seems incredibly simple. I've tried a simple left join but it didn't give me the results I was hoping for.&lt;/P&gt;
&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I have a dataset of hospitalizations containing patient identification numbers and various other characteristics.&lt;/P&gt;
&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;in the dataset, we have index events hospitalizations for a certain procedure + readmission hospitalizations. Thus, a specific patient ID number has 2 rows of data if they were readmitted (with the latter having readmission=1 and readmitdiagnosis. Values for these variables are null in the index hospitalization row.&lt;/P&gt;
&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;How can I collapse these rows so each patient just has one row containing all of their data + readmission, readmitdiagnosis from the latter line?&lt;/P&gt;
&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Thank you in advance for the help.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Before going too far down this path you should consider definition of "readmission" and carefully share that. One concern is that a patient may have multiple readmissions and how to collapse 2 records, as described, will likely have a very poor result for someone with 2, 3, 4 or more readmissions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which is run reason to provide example data and what the resulting output should be as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&amp;nbsp;suggests.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another bit might be describe what you expect to use that "collapsed" data for. It may well be possible to use your current data without bodging things together.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 16:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Help-with-collapsing-rows-by-identification-number/m-p/630138#M20796</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-03-06T16:25:03Z</dc:date>
    </item>
  </channel>
</rss>

