<?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: Finding Missing Medication Date with in a specified period in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261576#M50938</link>
    <description>&lt;PRE&gt;
data have;
input Patient Dosedate: mmddyy10.;
format Dosedate mmddyy10.;
cards;
101      01/01/2015
101      01/02/2015
101      01/03/2015
101      01/04/2015
102      01/05/2015
102      01/06/2015
102      01/08/2015
102      01/10/2015
;
run;
data want;
 merge have have(firstobs=2 rename=(Patient=_Patient  Dosedate=_Dosedate));
 output;
 if Patient=_Patient then do;
  do i=Dosedate+1 to _Dosedate-1;
   Dosedate=.;miss_date=i;output;
  end; 
 end;
 format miss_date mmddyy10.;
 drop i _:;
run;


&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 Apr 2016 02:34:47 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-04-06T02:34:47Z</dc:date>
    <item>
      <title>Finding Missing Medication Date with in a specified period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261346#M50836</link>
      <description>&lt;P&gt;The prtocol for the study working on specifies, that a patient is to be dosed everyday for a period of time. The raw data is below.&lt;/P&gt;&lt;P&gt;Patient Dosedate&lt;/P&gt;&lt;P&gt;101 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/01/2015&lt;/P&gt;&lt;P&gt;101 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/02/2015&lt;/P&gt;&lt;P&gt;101 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/03/2015&lt;/P&gt;&lt;P&gt;101 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/04/2015&lt;/P&gt;&lt;P&gt;102 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/05/2015&lt;/P&gt;&lt;P&gt;102 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/06/2015&lt;/P&gt;&lt;P&gt;102 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/08/2015&lt;/P&gt;&lt;P&gt;102 &amp;nbsp; &amp;nbsp; &amp;nbsp;01/10/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can Identify a patient who missed a consecutive dose?&lt;/P&gt;&lt;P&gt;Example: Patient102 missied dose on 01/07/2015 and 01/09/2015.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 12:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261346#M50836</guid>
      <dc:creator>Sandy1985</dc:creator>
      <dc:date>2016-04-05T12:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Missing Medication Date with in a specified period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261349#M50838</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Retain or lag. &amp;nbsp;Eg.&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  by patient;
  retain lstdate;
  if first.patient then lstdate=dosedate;
  else do;
    if dosedate ne lstdate + 1 then flag=1; 
    lstdate=dosedate;
  end;
run;
    &lt;/PRE&gt;
&lt;P&gt;Not tested.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 12:38:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261349#M50838</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-04-05T12:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Missing Medication Date with in a specified period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261484#M50905</link>
      <description>&lt;P&gt;Or use SQL and the fact that dates are numbers of days&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table missingPatient as
select Patient
from have
group by Patient
having range(DoseDate) + 1 &amp;gt; count(distinct doseDate);
select * from missingPatient;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261484#M50905</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-04-05T17:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Missing Medication Date with in a specified period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261576#M50938</link>
      <description>&lt;PRE&gt;
data have;
input Patient Dosedate: mmddyy10.;
format Dosedate mmddyy10.;
cards;
101      01/01/2015
101      01/02/2015
101      01/03/2015
101      01/04/2015
102      01/05/2015
102      01/06/2015
102      01/08/2015
102      01/10/2015
;
run;
data want;
 merge have have(firstobs=2 rename=(Patient=_Patient  Dosedate=_Dosedate));
 output;
 if Patient=_Patient then do;
  do i=Dosedate+1 to _Dosedate-1;
   Dosedate=.;miss_date=i;output;
  end; 
 end;
 format miss_date mmddyy10.;
 drop i _:;
run;


&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Apr 2016 02:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Finding-Missing-Medication-Date-with-in-a-specified-period/m-p/261576#M50938</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-06T02:34:47Z</dc:date>
    </item>
  </channel>
</rss>

