<?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 prohibited medications check in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66424#M1568</link>
    <description>How to check programmatically if patient is taking medications more than 3 times a week?  Patient ID, drug name and dates are known.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
   Eugene</description>
    <pubDate>Mon, 23 Aug 2010 13:33:21 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-08-23T13:33:21Z</dc:date>
    <item>
      <title>prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66424#M1568</link>
      <description>How to check programmatically if patient is taking medications more than 3 times a week?  Patient ID, drug name and dates are known.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
   Eugene</description>
      <pubDate>Mon, 23 Aug 2010 13:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66424#M1568</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-23T13:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66425#M1569</link>
      <description>Using DATE, create a WEEK_START date using the INTNX function.  Then use a SAS PROC (SUMMARY, MEANS), as required, for aggregation and analysis.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
intnx function site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
Related DOC:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001304321.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001304321.htm&lt;/A&gt;

Message was edited by: sbb</description>
      <pubDate>Mon, 23 Aug 2010 13:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66425#M1569</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-08-23T13:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66426#M1570</link>
      <description>Hi SBB,&lt;BR /&gt;
 please see data below, I need to have a list of ID/DRUG/DATE, that have taken the same drug more than 3 times a week. Thank you for you help.&lt;BR /&gt;
&lt;BR /&gt;
ID	DRUG	DATE&lt;BR /&gt;
100001	ADVIL	2010-03-25&lt;BR /&gt;
100001	TILENOL	2010-04-08&lt;BR /&gt;
100001	TILENOL	2010-04-10&lt;BR /&gt;
100001	TILENOL	2010-04-12&lt;BR /&gt;
100001	TILENOL	2010-04-14&lt;BR /&gt;
100001	TILENOL	2010-04-28&lt;BR /&gt;
100001	TILENOL	2010-05-01&lt;BR /&gt;
100002	ADVIL	2010-04-01&lt;BR /&gt;
100002	ADVIL	2010-04-09&lt;BR /&gt;
100002	ADVIL	2010-04-10&lt;BR /&gt;
100002	ADVIL	2010-04-12&lt;BR /&gt;
100002	ADVIL	2010-04-14&lt;BR /&gt;
100002	TILENOL	2010-04-28&lt;BR /&gt;
100002	TILENOL	2010-05-01</description>
      <pubDate>Mon, 23 Aug 2010 14:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66426#M1570</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-23T14:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66427#M1571</link>
      <description>Suggest you have a look at some SAS DOC on DATA step programming to get you started with learning SAS Base programming skills, my friend.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
data step input data site:sas.com</description>
      <pubDate>Mon, 23 Aug 2010 16:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66427#M1571</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-08-23T16:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66428#M1572</link>
      <description>Hello Evolod,&lt;BR /&gt;
&lt;BR /&gt;
This is a possible solution to your problem. For the data you supplied all patients took less than 3 medications a week.&lt;BR /&gt;
&lt;BR /&gt;
data a;&lt;BR /&gt;
  input ID 1-6 DRUG $ 8-14 DATE YYMMDD11.;&lt;BR /&gt;
  format date date7.;&lt;BR /&gt;
datalines;&lt;BR /&gt;
100001 ADVIL   2010-03-25&lt;BR /&gt;
100001 TILENOL 2010-04-08&lt;BR /&gt;
100001 TILENOL 2010-04-10&lt;BR /&gt;
100001 TILENOL 2010-04-12&lt;BR /&gt;
100001 TILENOL 2010-04-14&lt;BR /&gt;
100001 TILENOL 2010-04-28&lt;BR /&gt;
100001 TILENOL 2010-05-01&lt;BR /&gt;
100002 ADVIL   2010-04-01&lt;BR /&gt;
100002 ADVIL   2010-04-09&lt;BR /&gt;
100002 ADVIL   2010-04-10&lt;BR /&gt;
100002 ADVIL   2010-04-12&lt;BR /&gt;
100002 ADVIL   2010-04-14&lt;BR /&gt;
100002 TILENOL 2010-04-28&lt;BR /&gt;
100002 TILENOL 2010-05-01 &lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
/* Add Year, Week */;&lt;BR /&gt;
data a1;&lt;BR /&gt;
  set a;&lt;BR /&gt;
	yr=YEAR(Date);&lt;BR /&gt;
  wk=WEEK(Date);&lt;BR /&gt;
run;&lt;BR /&gt;
/* Check if patient is taking meds more that 3 times a week */;&lt;BR /&gt;
proc SQL;&lt;BR /&gt;
  create table r as&lt;BR /&gt;
  select ID, yr, wk, Count(*) as n, &lt;BR /&gt;
    case &lt;BR /&gt;
      when calculated n &amp;gt; 3 then ' &amp;gt;3'&lt;BR /&gt;
      else                       '&amp;lt;=3'&lt;BR /&gt;
    end as result&lt;BR /&gt;
  from a1&lt;BR /&gt;
  group by ID, yr, wk &lt;BR /&gt;
;quit;&lt;BR /&gt;
&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Tue, 09 Nov 2010 19:11:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66428#M1572</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2010-11-09T19:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66429#M1573</link>
      <description>Sorry, part of the code has been cut by forum software. It does not like apostrophes.&lt;BR /&gt;
This is the last proc SQL:&lt;BR /&gt;
&lt;BR /&gt;
proc SQL;&lt;BR /&gt;
  create table r as&lt;BR /&gt;
  select ID, yr, wk, Count(*) as n, &lt;BR /&gt;
    case &lt;BR /&gt;
      when calculated n &amp;gt; 3 then 'n GT 3'&lt;BR /&gt;
			else                       'n LE 3'&lt;BR /&gt;
		end as result&lt;BR /&gt;
	from a1&lt;BR /&gt;
	group by ID, yr, wk &lt;BR /&gt;
;quit;&lt;BR /&gt;
&lt;BR /&gt;
SPR</description>
      <pubDate>Tue, 09 Nov 2010 19:31:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66429#M1573</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2010-11-09T19:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66430#M1574</link>
      <description>Hi:&lt;BR /&gt;
  The issue is not the apostrophe, it is  the &amp;lt; or &amp;gt; symbol. When you post to the forum using the posting mechanism, the &amp;lt; and &amp;gt; symbols, in particular, look like HTML tags. So you have to "hide" them from being mis-interpreted as HTML tags.&lt;BR /&gt;
  &lt;BR /&gt;
  This previous forum posting:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609毙" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609毙&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
explains how to use the &amp;amp;lt; and &amp;amp;gt; coding (for &amp;lt; and &amp;gt; respectively) to stop those symbols from being treated as HTML and truncating your posts.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 10 Nov 2010 03:10:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66430#M1574</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-11-10T03:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: prohibited medications check</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66431#M1575</link>
      <description>This program will check before 7 days for each record's date and if the count is ge 3 then will print the patient id and drug name corresponding to it.&lt;BR /&gt;
&lt;BR /&gt;
data pat;&lt;BR /&gt;
input ID	DRUG : $10.	d_DATE :  yymmdd10.;&lt;BR /&gt;
format d_date date9.;&lt;BR /&gt;
cards;&lt;BR /&gt;
100001	ADVIL	2010-03-25&lt;BR /&gt;
100001	TILENOL	2010-04-08&lt;BR /&gt;
100001	TILENOL	2010-04-10&lt;BR /&gt;
100001	TILENOL	2010-04-12&lt;BR /&gt;
100001	TILENOL	2010-04-14&lt;BR /&gt;
100001	TILENOL	2010-04-28&lt;BR /&gt;
100001	TILENOL	2010-05-01&lt;BR /&gt;
100002	ADVIL	2010-04-01&lt;BR /&gt;
100002	ADVIL	2010-04-09&lt;BR /&gt;
100002	ADVIL	2010-04-10&lt;BR /&gt;
100002	ADVIL	2010-04-12&lt;BR /&gt;
100002	ADVIL	2010-04-14&lt;BR /&gt;
100002	TILENOL	2010-04-28&lt;BR /&gt;
100002	TILENOL	2010-05-01&lt;BR /&gt;
;run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
select unique id, drug&lt;BR /&gt;
	from&lt;BR /&gt;
	(&lt;BR /&gt;
		select &lt;BR /&gt;
			id,&lt;BR /&gt;
			drug,&lt;BR /&gt;
			d_date,&lt;BR /&gt;
			count(*) as cnt &lt;BR /&gt;
			from&lt;BR /&gt;
				(&lt;BR /&gt;
					select &lt;BR /&gt;
							a.*,&lt;BR /&gt;
							b.id as b_id,&lt;BR /&gt;
							b.drug as b_drug,&lt;BR /&gt;
							b.d_date as b_d_date &lt;BR /&gt;
						from pat a &lt;BR /&gt;
								join pat b on a.id=b.id &lt;BR /&gt;
												and a.drug=b.drug &lt;BR /&gt;
												and a.d_date between b.d_date-7 and b.d_date&lt;BR /&gt;
				) a&lt;BR /&gt;
		group by 1,2,3&lt;BR /&gt;
		having count(*)&amp;gt;=3&lt;BR /&gt;
	);&lt;BR /&gt;
quit;</description>
      <pubDate>Tue, 16 Nov 2010 16:11:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/prohibited-medications-check/m-p/66431#M1575</guid>
      <dc:creator>sivaji</dc:creator>
      <dc:date>2010-11-16T16:11:17Z</dc:date>
    </item>
  </channel>
</rss>

