<?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: Logical decisions based on the before and after certain date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503186#M134410</link>
    <description>I'm wondering about using "between" in prc sql using pre-defined 15 day ranges around date_diagnosis</description>
    <pubDate>Wed, 10 Oct 2018 18:33:10 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2018-10-10T18:33:10Z</dc:date>
    <item>
      <title>Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/502955#M134328</link>
      <description>&lt;P&gt;Hi SAS experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help to accomplish following tasks in SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;I have an ambulance data which has the&amp;nbsp;admission date and insurance id. Inpatient data has the date of hospitalization and insurance id. I also have patient_id file which uniquely identifies patients.&amp;nbsp;&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;I’m trying to achieve following:&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;- find the records in the ambulance data where admission date (ambulance_date) equals or in the same month and year with (date_diagnosis).&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;- find the records in the inpatient data where date of hospitalization (inp_date) equals or in the same month and year with (date_diagnosis).&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;- select the nearest of the ambulance_date and inp_date to the date_diagnosis, that is to say, if ambulance_date=Dec 15, 2010 and inp_date=Oct 10, 2010 while date_diagnosis Dec 12, 2010 then select ambulance_date=Dec 15, 2010.&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;- I have to consider only if ambulance and inpatient dates happen after date-diagnosis. But I couldn’t do it because when I delete ambulance_date before date_diagnosis some eligible records where inpatient_date after date_diagnosis were deleted.&lt;/P&gt;
&lt;P class="xmsonormal" style="margin: 0in; margin-bottom: .0001pt; text-autospace: none;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ambulance_date; 
input insurance_id amb_date;
cards;  
1 18168 
1 16997 
1 18024 
1 16955 
1 18280 
1 17542 
1 18365 
1 18299 
1 18884 
1 18954 
2 16939 
2 16941 
2 16966
;

data inpatient_date; 
input insurance_id inp_date; 
cards;
1 16692 
1 17519 
1 17209 
1 18024 
1 18299 
1 18309 
1 18891 
1 18823 
1 18609 
1 17051 
2 16960 
2 16979 
2 17005 
2 16974 
2 16979
; 

data patient_id; 
input pat_id $ insurance_id date_death date_diagnosis;
cards;
PAT009 1 18983 18884 
PAT092 2 17061 16940 
;

/*MERGE AMBULANCE DATA TO PATIENT DATA*/

proc sort data=ambulance_date; /*n=13*/
by INSURANCE_ID;
proc sort data=patient_id; /*n=2*/
by INSURANCE_ID;
data pat_amb; /*n=13*/ 
merge ambulance_date   (in=b)  
      patient_id       (in=c); 
by INSURANCE_ID;
if b; 
run; 

data pat_amb1; /*N=5*/ set pat_amb; /*N=13*/  
amb_year=year(amb_date);
amb_month=month(amb_date);
amb_yymm = put(amb_date,yymmn6.);
date_diagnosis_yymm = put(date_diagnosis,yymmn6.);
if date_diagnosis_yymm&amp;lt;=amb_yymm then output; 
run;


/*MERGE RESULTING DATA TO INPATIENT DATA*/

proc sort data=inpatient_date;/*n=15*/
by INSURANCE_ID;
proc sort data=pat_amb1;/*n=5*/
by INSURANCE_ID;
data pat_amb_inp;/*n=15*/
merge inpatient_date (in=b)   
      pat_amb1       (in=c); 
by INSURANCE_ID;
if b or c; 
run; 


data pat_amb1; /*N=5*/ set pat_amb_inp; /*N=15*/  
inp_year=year(inp_date);
inp_month=month(inp_date);
inp_yymm = put(inp_date,yymmn6.);

/* I CAN'T DO IT BECAUSE IT WILL DELETE ELIGIBLE
OBSERVATIONS WHERE AMBULANCE DATE IS AFTER DIAGNOSIS DATE*/
if date_diagnosis_yymm&amp;lt;=inp_yymm then output; 
run;








&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 12:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/502955#M134328</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-10T12:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/502988#M134337</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS merge is not able to merge many to many, you need to use PROC SQL.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
   /*CREATE TABLE want AS*/
      SELECT a.pat_id
           , a.insurance_id
           , a.date_death format is8601da.
           , a.date_diagnosis format is8601da.
           , b.amb_date format is8601da.
           , c.inp_date format is8601da.
           , ifc(amb_date&amp;lt;=inp_date,ifc(amb_date=inp_date,'amb_date = inp_date','amb_date &amp;lt; inp_date'),'amb_date &amp;gt; inp_date') as description format=$20.
           , min(amb_date,inp_date) as NearestDate format is8601da.
      FROM patient_id a
      LEFT JOIN ambulance_date b
      ON a.insurance_id eq b.insurance_id
      AND b.amb_date GE a.date_diagnosis /*amb_date after or on date_diagnosis*/
      AND substr(put(b.amb_date,is8601da.),1,7) EQ substr(put(a.date_diagnosis,is8601da.),1,7) /*amb_date in same month and year as date_diagnosis*/
      LEFT JOIN inpatient_date c
      ON a.insurance_id eq c.insurance_id
      AND c.inp_date GE a.date_diagnosis /*inp_date after or on date_diagnosis*/
      AND substr(put(c.inp_date,is8601da.),1,7) EQ substr(put(a.date_diagnosis,is8601da.),1,7) /*inp_date in same month and year as date_diagnosis*/
   ;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 06:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/502988#M134337</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2018-10-10T06:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503039#M134363</link>
      <description>&lt;P&gt;HI Cruise,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
CREATE TABLE PAT_AMB_INP AS SELECT
A.pat_id,
A.insurance_id,
A.date_death AS date_death FORMAT=DATE9.,
A.date_diagnosis AS date_diagnosis FORMAT=DATE9.,
B.amb_date AS amb_date FORMAT=DATE9.,
C.inp_date AS inp_date FORMAT=DATE9.,
MIN(amb_date,inp_date) AS NEAREST_DATE FORMAT=DATE9.	/* select the nearest of the ambulance_date and inp_date to the date_diagnosis */
FROM patient_id AS A
LEFT JOIN ambulance_date AS B ON A.insurance_id = B.insurance_id 
							AND SUBSTR(PUT(A.date_diagnosis,DATE9.),3,9) = SUBSTR(PUT(B.amb_date,DATE9.),3,9)	/* find records in the ambulance data where admission date (ambulance_date) equals or in the same month and year with (date_diagnosis) */
							AND A.date_diagnosis &amp;lt;= B.amb_date 													/* consider only if ambulance and inpatient dates happen after date-diagnosis */
LEFT JOIN inpatient_date AS C ON A.insurance_id = C.insurance_id 
							AND SUBSTR(PUT(A.date_diagnosis,DATE9.),3,9) = SUBSTR(PUT(C.inp_date,DATE9.),3,9)	/* find records in the inpatient data where date of hospitalization to inpatient dept (inp_date) equals or in the same month and year with (date_diagnosis) */
							AND A.date_diagnosis &amp;lt;= C.inp_date													/* consider only if ambulance and inpatient dates happen after date-diagnosis */
;QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 11:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503039#M134363</guid>
      <dc:creator>FrankieNg</dc:creator>
      <dc:date>2018-10-10T11:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503077#M134380</link>
      <description>Hi Frankie, Thanks a lot. &lt;BR /&gt;Great approach, seems tiny problem here. See log below. It generates inpatient-date missing in the output data.  &lt;BR /&gt;&lt;BR /&gt;NOTE: This SAS session is using a registry in WORK.  All changes will be lost at the end of this&lt;BR /&gt;      session.&lt;BR /&gt;63   PROC SQL;&lt;BR /&gt;64   CREATE TABLE PAT_AMB_INP AS SELECT&lt;BR /&gt;65   A.pat_id,&lt;BR /&gt;66   A.insurance_id,&lt;BR /&gt;67   A.date_death AS date_death FORMAT=DATE9.,&lt;BR /&gt;68   A.date_diagnosis AS date_diagnosis FORMAT=DATE9.,&lt;BR /&gt;69   B.amb_date AS amb_date FORMAT=DATE9.,&lt;BR /&gt;70   C.inp_date AS inp_date FORMAT=DATE9.,&lt;BR /&gt;71   MIN(amb_date,inp_date) AS NEAREST_DATE FORMAT=DATE9.    /* select the nearest of the&lt;BR /&gt;71 ! ambulance_date and inp_date to the date_diagnosis */&lt;BR /&gt;72   FROM patient_id AS A&lt;BR /&gt;73   LEFT JOIN ambulance_date AS B ON A.insurance_id = B.insurance_id&lt;BR /&gt;74                               AND SUBSTR(PUT(A.date_diagnosis,DATE9.),3,9) =&lt;BR /&gt;74 ! SUBSTR(PUT(B.amb_date,DATE9.),3,9)   /* find records in the ambulance data where admission&lt;BR /&gt;74 ! date (ambulance_date) equals or in the same month and year with (date_diagnosis) */&lt;BR /&gt;75                               AND A.date_diagnosis &amp;lt;= B.amb_date&lt;BR /&gt;75 !                   /* consider only if ambulance and inpatient dates happen after&lt;BR /&gt;75 ! date-diagnosis */&lt;BR /&gt;76   LEFT JOIN inpatient_date AS C ON A.insurance_id = C.insurance_id&lt;BR /&gt;77                               AND SUBSTR(PUT(A.date_diagnosis,DATE9.),3,9) =&lt;BR /&gt;77 ! SUBSTR(PUT(C.inp_date,DATE9.),3,9)   /* find records in the inpatient data where date of&lt;BR /&gt;77 ! hospitalization to inpatient dept (inp_date) equals or in the same month and year with&lt;BR /&gt;77 ! (date_diagnosis) */&lt;BR /&gt;78                               AND A.date_diagnosis &amp;lt;= C.inp_date&lt;BR /&gt;78 !                   /* consider only if ambulance and inpatient dates happen after&lt;BR /&gt;78 ! date-diagnosis */&lt;BR /&gt;79   ;&lt;BR /&gt;NOTE: Invalid argument 3 to function SUBSTR. Missing values may be generated.&lt;BR /&gt;NOTE: Invalid argument 3 to function SUBSTR. Missing values may be generated.&lt;BR /&gt;NOTE: Invalid argument 3 to function SUBSTR. Missing values may be generated.&lt;BR /&gt;NOTE: Invalid argument 3 to function SUBSTR. Missing values may be generated.&lt;BR /&gt;NOTE: Table WORK.PAT_AMB_INP created, with 2 rows and 7 columns.&lt;BR /&gt;&lt;BR /&gt;79 !  QUIT;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Oct 2018 13:30:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503077#M134380</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-10T13:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503081#M134381</link>
      <description>INP_DATE IS MISSING BECAUSE IT WAS SELECTED AS THE NEAREST DATE? OH NO, BUT THE AMBULANCE DATE SELECTED APPEARS UNDER AMB_DATE. ANY OF THESE AFFECTED THE FINAL RESULT BUT JUST CURIOUS AS TO WHY.</description>
      <pubDate>Wed, 10 Oct 2018 13:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503081#M134381</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-10T13:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503099#M134385</link>
      <description>&lt;P&gt;Hi Cruise,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The inpatient date missing is because none of the inpatient date fulfill the condition "&lt;SPAN&gt;&lt;EM&gt;find the records in the inpatient data where date of hospitalization (inp_date) equals or in the same month and year with (date_diagnosis)&lt;/EM&gt;." for the second patient.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503099#M134385</guid>
      <dc:creator>FrankieNg</dc:creator>
      <dc:date>2018-10-10T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503112#M134389</link>
      <description>&lt;P&gt;Hi Cruise,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may refers to the solution prepared by Oligolas too. It provided the same output.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 14:56:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503112#M134389</guid>
      <dc:creator>FrankieNg</dc:creator>
      <dc:date>2018-10-10T14:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503119#M134390</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238387"&gt;@FrankieNg&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77163"&gt;@Oligolas&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran the code on the actual two cases&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ambulance_date has 609 observations&amp;nbsp;&lt;BR /&gt;inpatient_date has 773 &lt;SPAN&gt;observations&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;patient_id has 2&amp;nbsp;&lt;SPAN&gt;observations&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, output dataset is following which includes all observations. However, I wanted the final selected variables and flagged from which dataset (ambulance or inpatinet) contributed to the nearest date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shall I create the new discussion on this issue or you know why&amp;nbsp;final dataset on the actual two cases are not&amp;nbsp;restricted to&amp;nbsp;the final selected date for the nearest date?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output data.png" style="width: 404px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23937i522E9500D724B408/image-size/large?v=v2&amp;amp;px=999" role="button" title="output data.png" alt="output data.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 15:07:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503119#M134390</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-10T15:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503146#M134400</link>
      <description>&lt;P&gt;By knowing&amp;nbsp;&lt;SPAN&gt;which dataset (ambulance or inpatinet) contributed to the nearest date, you can include something like this in the PROC SQL after the NEAREST_DATE..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CASE WHEN CALCULATED NEAREST_DATE EQ amb_date THEN "Ambulance_Date" ELSE "Inpatient_Date" END AS DATE_SOURCE FORMAT=$20.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you expect only 2 observations in your final dataset (because there are only 2 patients) ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 16:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503146#M134400</guid>
      <dc:creator>FrankieNg</dc:creator>
      <dc:date>2018-10-10T16:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503154#M134403</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/238387"&gt;@FrankieNg&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really really appreciate your time indeed and getting back to me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to consider 15 days before and after the date_daignosis. Final dataset should include all dates, for example, from 09/1/2011 through 09/30/2011 because 9/15/2011 is the mid-point of this range by 15 days per-post in relation to the date_diagnosis while excluding any dates fell out of this 30-day range. Same logic applies to the id=2 patient as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My original post said: same month and year however sep 1 and sep 30 would fall in the same month and year as same as sep 1 and sep 2. So, maybe, using 15 days before and after the mid-point which is date_diagnosis would make more sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dataset wanted for final output:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="427"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="31"&gt;id&lt;/TD&gt;
&lt;TD width="74"&gt;amb_date&lt;/TD&gt;
&lt;TD width="75"&gt;inp-date&lt;/TD&gt;
&lt;TD width="102"&gt;date_diagnosis&lt;/TD&gt;
&lt;TD width="71"&gt;nereast&lt;/TD&gt;
&lt;TD width="74"&gt;source&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;both&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/1/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;ambulance&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;9/30/2011&lt;/TD&gt;
&lt;TD&gt;9/10/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/10/2011&lt;/TD&gt;
&lt;TD&gt;inpatient&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;9/1/2011&lt;/TD&gt;
&lt;TD&gt;9/28/2011&lt;/TD&gt;
&lt;TD&gt;9/15/2011&lt;/TD&gt;
&lt;TD&gt;9/28/2011&lt;/TD&gt;
&lt;TD&gt;inpatient&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Wed, 10 Oct 2018 16:30:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503154#M134403</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-10T16:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Logical decisions based on the before and after certain date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503186#M134410</link>
      <description>I'm wondering about using "between" in prc sql using pre-defined 15 day ranges around date_diagnosis</description>
      <pubDate>Wed, 10 Oct 2018 18:33:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Logical-decisions-based-on-the-before-and-after-certain-date/m-p/503186#M134410</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-10-10T18:33:10Z</dc:date>
    </item>
  </channel>
</rss>

