<?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: Convert ICD code range to each individual code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568580#M160078</link>
    <description>&lt;P&gt;I already have the list of codes in range format that has been sent to me. So I am good there. I just need some help on the code I have written.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2019 21:47:31 GMT</pubDate>
    <dc:creator>rosegarden81</dc:creator>
    <dc:date>2019-06-24T21:47:31Z</dc:date>
    <item>
      <title>Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568561#M160069</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a SAS data set with a variable 'ICD10' which looks like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ICD10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A00.0- A00.8&lt;/P&gt;&lt;P&gt;A01.00 - A01.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert this file to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ICD10_newvar&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;A00.0&lt;/P&gt;&lt;P&gt;A00.1&lt;/P&gt;&lt;P&gt;A00.2&lt;/P&gt;&lt;P&gt;A00.3&lt;/P&gt;&lt;P&gt;A00.4&lt;/P&gt;&lt;P&gt;A00.5&lt;/P&gt;&lt;P&gt;A00.6&lt;/P&gt;&lt;P&gt;A00.7&lt;/P&gt;&lt;P&gt;A00.8&lt;/P&gt;&lt;P&gt;A01.00&lt;/P&gt;&lt;P&gt;A01.01&lt;/P&gt;&lt;P&gt;A01.02&lt;/P&gt;&lt;P&gt;A01.03&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;A01.18&lt;/P&gt;&lt;P&gt;A01.19&lt;/P&gt;&lt;P&gt;A01.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically converting the range to individual ICD codes..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance on this would be highly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tina&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>Mon, 24 Jun 2019 21:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568561#M160069</guid>
      <dc:creator>rosegarden81</dc:creator>
      <dc:date>2019-06-24T21:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568565#M160071</link>
      <description>&lt;P&gt;Your desired list may be incomplete:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; A00 Cholera 
A00.0 Cholera due to Vibrio cholerae 01, biovar cholerae
A00.1 Cholera due to Vibrio cholerae 01, biovar eltor
A00.9 Cholera, unspecified

&lt;/PRE&gt;
&lt;P&gt;Since so many ICD-10 codes have sub-codes you need to describe how many levels you may need.&lt;/P&gt;
&lt;P&gt;I would say you might be better off starting with a very complete data set of codes and extracting them.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 21:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568565#M160071</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-06-24T21:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568569#M160072</link>
      <description>&lt;P&gt;So if I want to still convert it this way as I was mentioning before, this is my progress on the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want1;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;test= substr(ICD10,1,3);&amp;nbsp; /* eg. A00 */&lt;/P&gt;&lt;P&gt;test1= scan(ICD10,1,'-');&amp;nbsp;&lt;/P&gt;&lt;P&gt;test1_1 = SCAN( test1, 2, '.') ; /* eg., 0 */&lt;/P&gt;&lt;P&gt;test2 = scan(ICD10 ,2,'-');&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;test2_1 = SCAN( test2, 2, '.') ;&amp;nbsp;/* eg., 9 */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want2;&lt;/P&gt;&lt;P&gt;set want1;&lt;/P&gt;&lt;P&gt;do i = test1_1 to test2_1;&lt;/P&gt;&lt;P&gt;testvar = catt(test, ".", i );&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong here? If I just manually substitute Test1_1 = 1 and test2_1 with 9 and rerun the want2 datastep, then I get some resutls (which is obviously not right for all codes but converts correctly for first row in original file).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some tips on what I may be doing wrong in this code instead of suggestions on alternate solutions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 21:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568569#M160072</guid>
      <dc:creator>rosegarden81</dc:creator>
      <dc:date>2019-06-24T21:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568575#M160076</link>
      <description>I would recommend downloading the list from CMS, importing it and then merging your categories the main list. The codes don't always behave the way you to want to. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.cms.gov/Medicare/Coding/ICD10/2018-ICD-10-CM-and-GEMs.html" target="_blank"&gt;https://www.cms.gov/Medicare/Coding/ICD10/2018-ICD-10-CM-and-GEMs.html&lt;/A&gt;</description>
      <pubDate>Mon, 24 Jun 2019 21:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568575#M160076</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T21:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568580#M160078</link>
      <description>&lt;P&gt;I already have the list of codes in range format that has been sent to me. So I am good there. I just need some help on the code I have written.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 21:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568580#M160078</guid>
      <dc:creator>rosegarden81</dc:creator>
      <dc:date>2019-06-24T21:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568586#M160082</link>
      <description>Why not merge with your full list then using SQL?&lt;BR /&gt;Split your range into a start and stop and then your join could be something like:&lt;BR /&gt;on icd_start &amp;lt; icd_code &amp;lt; icd_end&lt;BR /&gt;&lt;BR /&gt;I feel like the rules building would be painful for ICD list.</description>
      <pubDate>Mon, 24 Jun 2019 22:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568586#M160082</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-06-24T22:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Convert ICD code range to each individual code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568592#M160087</link>
      <description>&lt;P&gt;I think we discussed it here and we are going to keep it as range format and use =: etc while analysing the data...so I am good now...thank you guys and sorry for the confusion..&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 22:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-ICD-code-range-to-each-individual-code/m-p/568592#M160087</guid>
      <dc:creator>rosegarden81</dc:creator>
      <dc:date>2019-06-24T22:18:33Z</dc:date>
    </item>
  </channel>
</rss>

