<?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: Date forward and backward. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875299#M345850</link>
    <description>Washout is 183 days from the grace period of the one week forward and two weeks backward.</description>
    <pubDate>Thu, 11 May 2023 17:23:09 GMT</pubDate>
    <dc:creator>mauri0623</dc:creator>
    <dc:date>2023-05-11T17:23:09Z</dc:date>
    <item>
      <title>Date forward and backward.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875204#M345816</link>
      <description>&lt;P&gt;Starting with the dataset below, we need to identify the index encounter, which is the encounter_date closest to the start_date.&lt;BR /&gt;Encounter_date may be up to two weeks prior to intake survey date(start_Date) through 1 week after it&lt;BR /&gt;We also need to apply a washout period. To qualify as an index encounter, there must be no other encounters within 183 days prior to the 2 week grace period, up to two weeks before the index period.&lt;/P&gt;&lt;P&gt;Person_ID Encoured_Date Start_Date&lt;BR /&gt;00006A7087 10/7/2021 4/5/2022&lt;BR /&gt;00006A7087 11/5/2021 4/5/2022&lt;BR /&gt;00006A7087 11/15/2021 4/5/2022&lt;BR /&gt;00006A7087 12/2/2021 4/5/2022&lt;BR /&gt;00006A7087 12/14/2021 4/5/2022&lt;BR /&gt;00006A7087 12/21/2021 4/5/2022&lt;BR /&gt;00006A7087 1/3/2022 4/5/2022&lt;BR /&gt;00006A7087 1/18/2022 4/5/2022&lt;BR /&gt;00006A7087 1/25/2022 4/5/2022&lt;BR /&gt;00006A7087 2/4/2022 4/5/2022&lt;BR /&gt;00006A7087 2/8/2022 4/5/2022&lt;BR /&gt;00006A7087 2/17/2022 4/5/2022&lt;BR /&gt;00006A7087 3/2/2022 4/5/2022&lt;BR /&gt;00006A7087 3/8/2022 4/5/2022&lt;BR /&gt;00006A7087 3/18/2022 4/5/2022&lt;BR /&gt;00006A7087 4/5/2022 4/5/2022&lt;BR /&gt;00006A7087 4/12/2022 4/5/2022&lt;BR /&gt;0000E20E92 1/28/2022 4/5/2022&lt;BR /&gt;0000E20E92 3/22/2022 4/5/2022&lt;BR /&gt;0000E20E92 4/5/2022 4/5/2022&lt;BR /&gt;0000E20E92 5/3/2022 4/5/2022&lt;BR /&gt;0000E20E92 5/17/2022 4/5/2022&lt;BR /&gt;0000E20E92 5/31/2022 4/5/2022&lt;BR /&gt;0000E20E92 7/15/2022 4/5/2022&lt;BR /&gt;0000E20E92 8/9/2022 4/5/2022&lt;BR /&gt;0000E20E92 10/19/2022 4/5/2022&lt;BR /&gt;0000E20E92 11/30/2022 4/5/2022&lt;BR /&gt;I know how to go 1 week forward and two weeks backward using the intnx function. I however don'w know about how to construct the washout period part.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 13:43:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875204#M345816</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2023-05-11T13:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date forward and backward.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875265#M345835</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Starting with the dataset below, we need to identify the index encounter, which is the encounter_date closest to the start_date.&lt;BR /&gt;Encounter_date may be up to two weeks prior to intake survey date(start_Date) through 1 week after it&lt;BR /&gt;We also need to apply a washout period. To qualify as an index encounter, there must be no other encounters within 183 days prior to the 2 week grace period, up to two weeks before the index period.&lt;/P&gt;
&lt;P&gt;&amp;lt;data removed&amp;gt;&lt;BR /&gt;I know how to go 1 week forward and two weeks backward using the intnx function. I however don'w know about how to construct the washout period part.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I do not see any clear rules defining what the "washout period" is. Or what "apply" means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 15:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875265#M345835</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-11T15:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date forward and backward.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875299#M345850</link>
      <description>Washout is 183 days from the grace period of the one week forward and two weeks backward.</description>
      <pubDate>Thu, 11 May 2023 17:23:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875299#M345850</guid>
      <dc:creator>mauri0623</dc:creator>
      <dc:date>2023-05-11T17:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date forward and backward.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875335#M345863</link>
      <description>&lt;P&gt;You are using terms that are likely intimately familiar to you. However, I do not know exactly what your definition of grace period is or when it starts.&lt;/P&gt;
&lt;P&gt;Is 183 days actually days or a supposed to be "6 months" or similar?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/181538"&gt;@mauri0623&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Washout is 183 days from the grace period of the one week forward and two weeks backward.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;One week forward from which specific date (or exactly how to derive that date given your example data set), similar "two weeks backward" from which date? And weeks may need some clarification. The day at the start of the week? Do you use Sunday, Monday or a different day of the week as start? Or is "week" exactly 7 days? Or the Sunday of the week that is 7 days prior (or after?). Or the first working day of week?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date intervals need very explicit rules and unfortunately there are multiple definitions of some of these. Look at the WEEK function documentation for example. It has 3 values for a parameter that are involved in defining the starting day of a "week" at the beginning of a year.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should show an example of the desired output so that we can see how you use your rules and to show the result after the "apply" as in "We also need to apply a washout period." Does apply mean set a flag? Remove observations? Add some value to an existing variable? Create additional observations?&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 19:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875335#M345863</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-05-11T19:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Date forward and backward.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875364#M345871</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;identify the index encounter, which is the encounter_date closest to the start_date"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Questions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;What if there is a tie?&amp;nbsp; If one date precedes start_date by the same number of days as another follows start_date, which one is selected as the index date.&lt;/LI&gt;
&lt;LI&gt;As per&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;'s note, what to you mean by "one week" and "two weeks"?&amp;nbsp; Do you mean exactly 7 or 14 days?&amp;nbsp; Or do you ignore weekends or other days?&lt;/LI&gt;
&lt;LI&gt;Does each person_id has only a single start_date value, as in your sample date?&amp;nbsp; &amp;nbsp;If so, do all your person_id's have the same start_date, as in your sample data?&lt;/LI&gt;
&lt;LI&gt;What do you want the output data to look like?&amp;nbsp; Or if it is a report, what do you want it to look like?&lt;/LI&gt;
&lt;LI&gt;If there is an encounter in the washout period, in what way will the output be different?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 11 May 2023 22:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-forward-and-backward/m-p/875364#M345871</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-05-11T22:17:14Z</dc:date>
    </item>
  </channel>
</rss>

