<?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 How do I definte a new variable?  Death within 1 year after chemo therapy in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289094#M59691</link>
    <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to definte a new variable as "Death within 1 year after chemo therapy" using the following dataset...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both patient_ID 10001 and 10002 has death_dates, but only patient_ID 10001 should be marked dead within 1 year because the death_date&amp;nbsp;falls within 1 year after First_Chemo_Date whereas patient ID 10002 does not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Patient_ID &amp;nbsp; &amp;nbsp; &amp;nbsp;First_Chemo_Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Death_Date&amp;nbsp;&lt;/P&gt;&lt;P&gt;10001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2010-05-01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2010-08-01&lt;/P&gt;&lt;P&gt;10002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2010-07-01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2012-05-01&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using previous help from generous members of this community, I tried the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data w.cancer;&lt;/P&gt;&lt;P&gt;set w.cancer;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF (FIRST_CHEMO_DATE&amp;lt;DEATH_DATE&amp;lt;FIRST_CHEMO_DATE+365) THEN DEATH_WITHIN_1YR_AFTER_CHEMO=1; ELSE IF&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DEATH_WITHIN_1YR_AFTER_CHEMO=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it is not giving me the result that I want...what am I doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or advice will be appreciated so much..,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2016 03:57:29 GMT</pubDate>
    <dc:creator>sasworker16</dc:creator>
    <dc:date>2016-08-03T03:57:29Z</dc:date>
    <item>
      <title>How do I definte a new variable?  Death within 1 year after chemo therapy</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289094#M59691</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to definte a new variable as "Death within 1 year after chemo therapy" using the following dataset...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both patient_ID 10001 and 10002 has death_dates, but only patient_ID 10001 should be marked dead within 1 year because the death_date&amp;nbsp;falls within 1 year after First_Chemo_Date whereas patient ID 10002 does not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Patient_ID &amp;nbsp; &amp;nbsp; &amp;nbsp;First_Chemo_Date &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Death_Date&amp;nbsp;&lt;/P&gt;&lt;P&gt;10001 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2010-05-01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2010-08-01&lt;/P&gt;&lt;P&gt;10002 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2010-07-01 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2012-05-01&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using previous help from generous members of this community, I tried the following.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data w.cancer;&lt;/P&gt;&lt;P&gt;set w.cancer;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF (FIRST_CHEMO_DATE&amp;lt;DEATH_DATE&amp;lt;FIRST_CHEMO_DATE+365) THEN DEATH_WITHIN_1YR_AFTER_CHEMO=1; ELSE IF&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DEATH_WITHIN_1YR_AFTER_CHEMO=0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it is not giving me the result that I want...what am I doing wrong here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or advice will be appreciated so much..,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 03:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289094#M59691</guid>
      <dc:creator>sasworker16</dc:creator>
      <dc:date>2016-08-03T03:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I definte a new variable?  Death within 1 year after chemo therapy</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289096#M59692</link>
      <description>&lt;P&gt;SAS treats dates as numbers so if you subtract the dates that should be the number of days between chemo and death.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 04:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289096#M59692</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-03T04:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I definte a new variable?  Death within 1 year after chemo therapy</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289099#M59694</link>
      <description>&lt;P&gt;I reformatted my dates and it works now. Thank you for your advice!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 04:21:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-definte-a-new-variable-Death-within-1-year-after-chemo/m-p/289099#M59694</guid>
      <dc:creator>sasworker16</dc:creator>
      <dc:date>2016-08-03T04:21:47Z</dc:date>
    </item>
  </channel>
</rss>

