<?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 Identify two visit dates after intervention in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identify-two-visit-dates-after-intervention/m-p/856939#M338569</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to identify&amp;nbsp;2 visits atleast 90 days apart after intervention date. For example, if I have a dataset like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;Intervention_date&amp;nbsp; &amp;nbsp; &amp;nbsp; Visit_1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Visit 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Visit_3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Visit_4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; follow-up date (intervention+365);&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/2/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4/2/2020&amp;nbsp; &amp;nbsp; 5/7/2020&amp;nbsp; &amp;nbsp; 6/8/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/1/2021&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/3/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5/4/2020&amp;nbsp; &amp;nbsp; 6/1/2020&amp;nbsp; &amp;nbsp; 8/4/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10/4/2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the intervention date but I do not have visit_1 to visit_4 yet. I have created a follow_up date as 12 months after intervention date (intervention date + 365) so as to see all visit_dates. I would expect that my visit_1 to visit_4 should be within intervention and follow_up date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task 1: I will like to create&amp;nbsp; visit_1 which is the first visit for each individual after the intervention date. I am thinking of using visit_1 = min(Intervention_date); I do try it but did not work as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task 2: I will like to create the second visit (visit_2) which will be at least 90 days after the visit_1. So the way am thinking this will be if a person has there visit_2 at least 90 days after visit_1, then visit_2 =1; else visit_2=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am struggling with doing this in SAS and will appreciate any help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 20:48:43 GMT</pubDate>
    <dc:creator>CathyVI</dc:creator>
    <dc:date>2023-02-02T20:48:43Z</dc:date>
    <item>
      <title>Identify two visit dates after intervention</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-two-visit-dates-after-intervention/m-p/856939#M338569</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to identify&amp;nbsp;2 visits atleast 90 days apart after intervention date. For example, if I have a dataset like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;Intervention_date&amp;nbsp; &amp;nbsp; &amp;nbsp; Visit_1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Visit 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Visit_3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Visit_4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; follow-up date (intervention+365);&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/2/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4/2/2020&amp;nbsp; &amp;nbsp; 5/7/2020&amp;nbsp; &amp;nbsp; 6/8/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1/1/2021&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2/3/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5/4/2020&amp;nbsp; &amp;nbsp; 6/1/2020&amp;nbsp; &amp;nbsp; 8/4/2020&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10/4/2020&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the intervention date but I do not have visit_1 to visit_4 yet. I have created a follow_up date as 12 months after intervention date (intervention date + 365) so as to see all visit_dates. I would expect that my visit_1 to visit_4 should be within intervention and follow_up date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task 1: I will like to create&amp;nbsp; visit_1 which is the first visit for each individual after the intervention date. I am thinking of using visit_1 = min(Intervention_date); I do try it but did not work as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task 2: I will like to create the second visit (visit_2) which will be at least 90 days after the visit_1. So the way am thinking this will be if a person has there visit_2 at least 90 days after visit_1, then visit_2 =1; else visit_2=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am struggling with doing this in SAS and will appreciate any help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 20:48:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-two-visit-dates-after-intervention/m-p/856939#M338569</guid>
      <dc:creator>CathyVI</dc:creator>
      <dc:date>2023-02-02T20:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Identify two visit dates after intervention</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-two-visit-dates-after-intervention/m-p/856951#M338577</link>
      <description>&lt;P&gt;While I really don't understand your problem description, I will point out that if the variable Intervention_date has values that are true SAS date values (integers that represent the number of days since 10JAN1960), then all you need to do to find out the date K days in the future is to add K to the Intervention_date. Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;followup_date=intervention_date+365;
format followup_date date9.; /* Or use any other date format you want */&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2023 21:36:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-two-visit-dates-after-intervention/m-p/856951#M338577</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-02T21:36:31Z</dc:date>
    </item>
  </channel>
</rss>

