<?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: Identifying an event in the past with a different start date for each person in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276096#M7775</link>
    <description>&lt;P&gt;I already have the start date (Fill date) - I am not sure how to code so that the 6 month look back period is different for each patient.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jun 2016 20:28:39 GMT</pubDate>
    <dc:creator>batulelec</dc:creator>
    <dc:date>2016-06-08T20:28:39Z</dc:date>
    <item>
      <title>Identifying an event in the past with a different start date for each person</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276093#M7773</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help with identifying if a patient has a prescription for a drug 6 months before the first fill date for the same drug. What is challenging here is that each patient will have a different first fill date and hence, the 6 month look back period will be different for each patient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for the year 2015 - one patient 1 has their first fill on&amp;nbsp;January 5th while patient 2 has&amp;nbsp;their first fill on&amp;nbsp;March 30. For patient1 I will have to look back to July 5th while for patient 2 I will have to look back upto September 30.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently my data is in this format -&amp;nbsp;&lt;/P&gt;&lt;P&gt;Patient ID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Medication &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fill date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/23&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5/22&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;Med3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..&lt;/P&gt;&lt;P&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Med2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can transpose the data and make it wide, but what I am struggling most with is identifying the different 6 month look back period for each patient from the fill date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be much appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 23:55:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276093#M7773</guid>
      <dc:creator>batulelec</dc:creator>
      <dc:date>2016-08-03T23:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an event in the past with a different start date for each person</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276095#M7774</link>
      <description>&lt;P&gt;This is probably a job for INTNX to find the start date of fill-6months. &amp;nbsp;If you post representative data and desired output you will get better help.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276095#M7774</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-06-08T20:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an event in the past with a different start date for each person</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276096#M7775</link>
      <description>&lt;P&gt;I already have the start date (Fill date) - I am not sure how to code so that the 6 month look back period is different for each patient.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276096#M7775</guid>
      <dc:creator>batulelec</dc:creator>
      <dc:date>2016-06-08T20:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an event in the past with a different start date for each person</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276098#M7776</link>
      <description>&lt;P&gt;Look at the documentation for INTNX you will find how to find a date 6 months in the past.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you post some representative data we can show example.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 20:33:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276098#M7776</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-06-08T20:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an event in the past with a different start date for each person</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276117#M7777</link>
      <description>&lt;P&gt;You don't need to change your data structure.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use what's called a self join. Join table to itself with the join condition being that the dates are within 6 months given ID and drug match. As mentioned INTNX will calculate the interval, but note that 6 months is not the same duration so you may want to define a fixed number of days rather than 6 months, ie 180 day?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you post sample input/output data for a code sample make sure to include the case where you have multiple dates for the same med, within the specified duration , ie patient 1 has med1 6 times in 6 months - monthly prescription.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 21:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276117#M7777</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-08T21:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Identifying an event in the past with a different start date for each person</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276143#M7780</link>
      <description>Show your sample data and output you want. It looks like SQL , Hash Table both can do that .</description>
      <pubDate>Thu, 09 Jun 2016 03:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Identifying-an-event-in-the-past-with-a-different-start-date-for/m-p/276143#M7780</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-09T03:16:14Z</dc:date>
    </item>
  </channel>
</rss>

