<?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: to read the dataset with a variable contains alpha, or number in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282606#M57457</link>
    <description>&lt;P&gt;I'm going to suggest a different but approach, build a library of ALL ICD9 and ICD10 codes, preferably each as a format. Then check each value against that list and see if it's present in either, both, or neither and classify accordingly. &amp;nbsp;Lists of each set of codes are available online.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2016 02:46:46 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-07-07T02:46:46Z</dc:date>
    <item>
      <title>to read the dataset with a variable contains alpha, or number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282486#M57414</link>
      <description>&lt;P&gt;I need to read the dataset contains both icd-9 and icd-10. My understanding is very limited.&lt;/P&gt;&lt;P&gt;So I am thinking to develop a program, that use the ANYALPHA and ANYDIGIT functions. But I am not clear how to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it would be, if the first character of the icd is numeric, then it is icd-9;&lt;/P&gt;&lt;P&gt;if it is "V" or "E", it would be icd-9,&lt;/P&gt;&lt;P&gt;else it would be icd-10;&lt;/P&gt;&lt;P&gt;anyone with this expereince?&lt;/P&gt;&lt;P&gt;tips on how to use anyalpha, anydigit funtions?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 17:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282486#M57414</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-06T17:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: to read the dataset with a variable contains alpha, or number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282495#M57417</link>
      <description>&lt;P&gt;These statements could go inside a DATA step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length type $ 6;&lt;/P&gt;
&lt;P&gt;if icd &amp;gt; ' ' then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if upcase(left(icd)) in : ('V', 'E', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9') then type='icd-9';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; else type='icd-10';&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 17:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282495#M57417</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-06T17:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: to read the dataset with a variable contains alpha, or number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282550#M57444</link>
      <description>&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;when i think it over, i feel my knowledge is not enough&lt;/P&gt;&lt;P&gt;data is unlimited, so there should be some other options, so the value might be icd-9, or icd-10, or both, or other 3.&lt;/P&gt;&lt;P&gt;by using your code, i find there are around 60% of obs using icd10, 40% using icd9.&lt;/P&gt;&lt;P&gt;Now I think I would ask for advice, if there are four options, listed above, other than two options only.&lt;/P&gt;&lt;P&gt;I do not know how it looks like if the code is both, and how to develop a program to read that. any advice?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the value of icd is more than 5 characters but less than 8, I can call it is icd10,&lt;/P&gt;&lt;P&gt;if the value has less than 3 character or more than 8 characters, i will call it "other"&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 03:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282550#M57444</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-11T03:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: to read the dataset with a variable contains alpha, or number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282552#M57445</link>
      <description>&lt;P&gt;When it comes to questions about what is in your data, and how you should interpret it, I'm not sure I can help.&amp;nbsp; For example, I'm not sure when "both" would be appropriate.&amp;nbsp; But the issues you are talking about are cases that SAS can handle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notice that&amp;nbsp; your code contains a logical error.&amp;nbsp; ELSE applies to only the previous IF/THEN statement, not to both as a group.&amp;nbsp; It would be improved by changing the second IF/THEN statement to say:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;else if upcase(left(icd)) in : ("A", "B", "C" ...) then type='icd=10';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would help to know whether ICD is already left-hand justified or not.&amp;nbsp; If it is, you can eliminate the LEFT function wherever any of the sample code uses it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To measure and use the length of ICD, these statements might be appropriate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;len = length(left(icd));&lt;/P&gt;
&lt;P&gt;if len &amp;gt; 8 then type='other';&lt;/P&gt;
&lt;P&gt;else if len &amp;lt; 3 then type='other';&lt;/P&gt;
&lt;P&gt;else if len in (6, 7) then type='icd-10';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many ways to set up these statements.&amp;nbsp; None of them are complex, but it takes some attention to the details to decide on the proper set of rules.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 21:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282552#M57445</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-07-06T21:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: to read the dataset with a variable contains alpha, or number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282606#M57457</link>
      <description>&lt;P&gt;I'm going to suggest a different but approach, build a library of ALL ICD9 and ICD10 codes, preferably each as a format. Then check each value against that list and see if it's present in either, both, or neither and classify accordingly. &amp;nbsp;Lists of each set of codes are available online.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2016 02:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/to-read-the-dataset-with-a-variable-contains-alpha-or-number/m-p/282606#M57457</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-07T02:46:46Z</dc:date>
    </item>
  </channel>
</rss>

