<?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: Patent Identification in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832207#M35694</link>
    <description>unexpected numbers.. number looks incorrect 7436258 is the total number in medication file of this claims data and the code gave me 878 diabetes patients</description>
    <pubDate>Wed, 07 Sep 2022 18:43:00 GMT</pubDate>
    <dc:creator>centro_9</dc:creator>
    <dc:date>2022-09-07T18:43:00Z</dc:date>
    <item>
      <title>Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832187#M35688</link>
      <description>&lt;P&gt;Hi everyone I wanted to get type 2 diabetes patients from claims data?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;DATA Array2;
	SET MED;
	ARRAY cc (10) $ MEDICAL_PRIMARY_DIAGNOSIS_CODE 
		MEDICAL_DIAGNOSIS_CODE_2-MEDICAL_DIAGNOSIS_CODE_9;
	DIABETESc=0;

	DO i=1 TO 10;

		IF cc (i) in ('250') then
			DIABETESc=1;

		IF cc (i) in ('E11.9' 'E11.8' 'E11.9' 'E11.69' 'E11.51' 'E11.21' 'E11.620' 
			'E11.621' 'E11.00-E11.65') then
				DIABETESc=1;
	END;

	If DIABETESc=. then
		DIABETESc=0;
RUN;

PROC SORT DATA=array2;
	BY Patient_ID DESCENDING DIABETESc;
RUN;

DATA ARRAY3;
	SET array2;
	BY Patient_ID;

	IF FIRST.Patient_ID;
RUN;

/*REMOVE THE MISSING VALUE FROM THE DATA*/
DATA ARRAY4;
	SET ARRAY3;

	IF DIABETESc=. THEN
		DELETE;
RUN;

/*COUNT ONLY diabetes PATIENTS*/
DATA ARRAY5;
	SET ARRAY4;

	IF DIABETESc=1;
RUN;

/*NUMBERS OF DIABETES PATIENTS*/
PROC FREQ DATA=ARRAY5;
	TABLES DIABETESc;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The problem is it gave me unexpected number of diabetes patients&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 18:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832187#M35688</guid>
      <dc:creator>centro_9</dc:creator>
      <dc:date>2022-09-07T18:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832188#M35689</link>
      <description>&lt;P&gt;What about this code isn't working? Please explain.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 17:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832188#M35689</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-07T17:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832191#M35690</link>
      <description>&lt;P&gt;And where is your problem?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 17:51:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832191#M35690</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-09-07T17:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832193#M35691</link>
      <description>&lt;P&gt;I cleaned up your post a bit, formatted your code and put it in a code block.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the issue with the code? Are you getting unexpected results or errors?&lt;/P&gt;
&lt;P&gt;There are a few ways to simplify this code for sure but without understanding your issue hard to know where to start.&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, 07 Sep 2022 18:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832193#M35691</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-09-07T18:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832202#M35692</link>
      <description>&lt;P&gt;The likely culprit is here:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;		IF cc (i) in ('E11.9' 'E11.8' 'E11.9' 'E11.69' 'E11.51' 'E11.21' 'E11.620' 
			'E11.621' 'E11.00-E11.65') then
				DIABETESc=1;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This does not define a range of values:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'E11.00-E11.65'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Rather, it defines a single value that is 13 characters long.&amp;nbsp; If there are no other values that would be selected by the comparison below, you could use it:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;		IF cc (i) in ('E11.9' 'E11.8' 'E11.9' 'E11.69' 'E11.51' 'E11.21' 'E11.620' 
			'E11.621') or ('E11.00' &amp;lt;= cc(i) &amp;lt;= 'E11.65') then
				DIABETESc=1;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Sep 2022 18:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832202#M35692</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-09-07T18:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832206#M35693</link>
      <description>no it worked but number looks incorrect 7436258 is the total number in medication file of this claims data and the code above gave me 878 diabetes patients</description>
      <pubDate>Wed, 07 Sep 2022 18:42:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832206#M35693</guid>
      <dc:creator>centro_9</dc:creator>
      <dc:date>2022-09-07T18:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832207#M35694</link>
      <description>unexpected numbers.. number looks incorrect 7436258 is the total number in medication file of this claims data and the code gave me 878 diabetes patients</description>
      <pubDate>Wed, 07 Sep 2022 18:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832207#M35694</guid>
      <dc:creator>centro_9</dc:creator>
      <dc:date>2022-09-07T18:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832208#M35695</link>
      <description>thank you for your help i USED THIS CODE BUT IT GAVE ME ERROR&lt;BR /&gt;"ARRAY SUBSCRIPT OUT OF RANGE AT LINE 333 COUMN 4"</description>
      <pubDate>Wed, 07 Sep 2022 18:45:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832208#M35695</guid>
      <dc:creator>centro_9</dc:creator>
      <dc:date>2022-09-07T18:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Patent Identification</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832217#M35696</link>
      <description>&lt;P&gt;To help debug the error, you will have to post the log from running that DATA step.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 19:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Patent-Identification/m-p/832217#M35696</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-09-07T19:13:19Z</dc:date>
    </item>
  </channel>
</rss>

