<?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: Adding Procedure Episode Numbers in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91576#M1749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for responding....sorry but I'm unsure what you mean about posting data in a data step.&amp;nbsp; Please clarify and I'll do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Aug 2012 16:28:40 GMT</pubDate>
    <dc:creator>shellp55</dc:creator>
    <dc:date>2012-08-13T16:28:40Z</dc:date>
    <item>
      <title>Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91573#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have base SAS and I'm using version 9.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have patient visit data where one line of data is one visit.&amp;nbsp; There are 20 potential interventions coded though this varies per visit and in fact some patients will have zero interventions.&amp;nbsp; There is also the possibility that a patient can have interventions on different dates with each date being a separate episode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way the data is structured is that I have a procedure start date and procedure code for the 20 potential spots.&amp;nbsp; So px1-px20 and pxstartdt1-pxstartdt20.&amp;nbsp; The data is entered such that if there is a px2 and pxstartdt2 is null then px2 is still part of episode 1.&amp;nbsp; If pxstartdt2 &amp;lt;&amp;gt; pxstartdt1 then it's a new episode.&amp;nbsp; Adding another wrinkle is that pxstartdt2 could have a date that matches pxstartdt1 which means it is still part of episode 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to do is loop through all 20 intervention spots and indicate episode number and also intervention occurrence number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;px1=5MD60AA&lt;/P&gt;&lt;P&gt;pxstartdt1=Apr 1, 2012&lt;/P&gt;&lt;P&gt;px2=1RB89LA&lt;/P&gt;&lt;P&gt;pxstartdt2=&lt;/P&gt;&lt;P&gt;px3=1YM91LA&lt;/P&gt;&lt;P&gt;pxstartdt3=&lt;/P&gt;&lt;P&gt;px4=3OD70CA&lt;/P&gt;&lt;P&gt;pxstartdt4=April 5, 2012&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example above px1 would be episode 1, occurrence 1; px2 would be episode 1, occurrence 2; px3 would be episode 1, occurrence 3; px4 would be episode 2, occurrence 1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone start me on what code I would use to accomplish this?&amp;nbsp; Thanks very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 14:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91573#M1746</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-13T14:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91574#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I figured out that I really don't want to loop through but I want to keep checking one to the others to see what episode it is.&amp;nbsp; It's not bad for the first few but by procedure 20 I will have to singularly compare to all the other dates....or do I?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the code I've got thus far (up to procedure 3) which works but I'm just trying to figure out if there is an easier/cleaner way to write it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 15:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91574#M1747</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-13T15:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91575#M1748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The easiest method (to code and understand) is to transpose your data from wide to long and then use by processing and re-transpose again at the end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR you could use arrays to simplify the logic above. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post some data in a data step? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 16:09:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91575#M1748</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-08-13T16:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91576#M1749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for responding....sorry but I'm unsure what you mean about posting data in a data step.&amp;nbsp; Please clarify and I'll do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 16:28:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91576#M1749</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-13T16:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91577#M1750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like the first post in the thread here. &lt;A __default_attr="134946" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Basically, so I can cut and paste, run the code and have your sample data without trying to mimic it myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 16:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91577#M1750</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-08-13T16:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91578#M1751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;BR /&gt;test_grp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;input &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;@&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; regno &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; PxStDate1 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;yymmdd8.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;12 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Px1 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$7.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;19 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;PxStDate2 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;yymmdd8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;27 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Px2 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$7.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;34 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;PxStDate3 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;yymmdd8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;42 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Px3 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$7.&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;49 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;PxStDate4 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;yymmdd8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;57 &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Px4 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$7.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;format &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;PxStDate1-PxStDate4 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;yymmdd10.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;001201203291RB89LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1RB87LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2OT71LA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;002201204171RM89LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1RD89LA201204203OT20WE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;003201204201VA53LA201204251VC55LA201204303OT20WE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;004201205131RM89LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1RD89LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2OT71LA201205253OT20WE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;005201206021VA53LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1VC55LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2OT20WE201206233OT20WE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background: #ffffc0; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;006201203291RB89LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1RB87LA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2OT71LA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; What should occur from above is:&lt;/P&gt;&lt;P&gt;regno 001 should have all 3 procedures as episode 1&lt;/P&gt;&lt;P&gt;regno 002 should have procedures 1 and 2 be episode 1 and procedure 3 is episode 2&lt;/P&gt;&lt;P&gt;regno 003 should have all 3 procedures be their own episode so episodes 1, 2 and 3&lt;/P&gt;&lt;P&gt;regno 004 should have procedures 1 and 2 be episode 1 and procedure 3 is episode 2&lt;/P&gt;&lt;P&gt;regno 005 should have procedures 1 and 2 be episode 1 and procedure 3 is episode 2&lt;/P&gt;&lt;P&gt;regno 006 should have all 3 procedures as episode 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help, Reeza!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 17:37:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91578#M1751</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-13T17:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91579#M1752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;regno 4/5 both have 4 procedures so assuming your logic holds, here some code that generates the episode/occurrence info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need help flipping the data back to single row let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data flipped;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test_grp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array pdates(4) pxstdate1-pxstdate4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array dx(4) px1-px4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i&amp;gt;1 and pdates(i)=. then pdates(i)=pdates(i-1); *Set it to the last date if missing and not the first of the record;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; px=dx(i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date=pdates(i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format date date9.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if dx(i) ne '' then output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop pxstdate: px1-px4;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*You may need to sort depending of what you're doing;&lt;/P&gt;&lt;P&gt;data flipped_mark;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set flipped;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; by regno date px notsorted;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; retain episode occurrence;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if first.regno then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if first.date then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if first.px then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 18:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91579#M1752</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-08-13T18:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91580#M1753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be the array solution but I can't seem to get the first one to work out properly.&lt;/P&gt;&lt;P&gt;Maybe you can debug it &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;data test_grp2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test_grp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array pdates(4) pxstdate1-pxstdate4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array dx(4) px1-px4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array episode(4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array occurrence(4);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode(i)=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence(i)=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (pdates(i)=. and not missing(dx(i)) ) or pdates(i)=pdates(i-1) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode(i)=episode(i-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence(i)=occurrence(i-1)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if not missing(dx(i)) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode(i)=episode(i-1)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence(i)=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if missing(dx(i)) then leave;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 18:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91580#M1753</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-08-13T18:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91581#M1754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much, Reeza.&amp;nbsp; I'll check this out and let you know how I do!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 19:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91581#M1754</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-13T19:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91582#M1755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reeza&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry but when I copied into the actual data, it's not working for cases where there is no procedure including for after there is data.&amp;nbsp; What I mean by that is if there are procedures in px1, px2 and px3, then the code will still insert an episode number in episode for px4 though it doesn't exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you able to help with that?&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 22:19:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91582#M1755</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-13T22:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91583#M1756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about this version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test_grp2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set test_grp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array pdates(4) pxstdate1-pxstdate4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array dx(4) px1-px4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array episode(4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; array occurrence(4);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode(i)=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence(i)=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if missing(dx(i)) then leave;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if pdates(i)=.&amp;nbsp; or pdates(i)=pdates(i-1) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode(i)=episode(i-1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence(i)=occurrence(i-1)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if not missing(dx(i)) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; episode(i)=episode(i-1)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; occurrence(i)=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 04:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91583#M1756</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-08-14T04:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91584#M1757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;SPAN style="font-family: Arial; font-size: 11pt;"&gt;Hi Reeza&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial; font-size: 11pt;"&gt;Thanks so much. This works&lt;BR /&gt;for the example provided but in mine I also added a 7th that doesn't have any&lt;BR /&gt;procedures at all and it still comes up with having episode 1 and occurrence 1.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial; font-size: 11pt;"&gt;So I changed the code to be&lt;BR /&gt;"if not missing(px1) &lt;SPAN style="color: blue;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;do&lt;/SPAN&gt; i=&lt;STRONG style="color: teal; font-family: Arial;"&gt;1&lt;/STRONG&gt; &lt;SPAN style="color: blue;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-family: Arial;"&gt;4&lt;/STRONG&gt;;" and that seems to&lt;BR /&gt;have fixed it. The logic is that if there isn't a px1 then there won't be any&lt;BR /&gt;procedures.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial; font-size: 11pt;"&gt;I'll apply this test to my "real" data and see what happens. Thanks so much for your help on&lt;BR /&gt;this Reeza!!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 13:10:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91584#M1757</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-14T13:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91585#M1758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know if I should post a different thread but the final piece of this puzzle is that I need to now convert the episode and occurrence number into a text combination. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried by doing the following:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;array &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;px_epi(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) epi1-epi20;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;array &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;px_num(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;) px_occur1-px_occur20;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;array &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;epi_occur(&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;if &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;not missing(epi1) &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;do &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;k=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;to&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;20&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;epi_occur(k)=put(px_epi(k),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;2.&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;)||&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"-"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;||put(px_num(k),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;2.&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-CA; mso-fareast-language: EN-CA; mso-bidi-language: AR-SA;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-CA; mso-fareast-language: EN-CA; mso-bidi-language: AR-SA;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;This isn't working and when I tried to just convert the episode, the field of epi_occur shows up but still as a number.&amp;nbsp; Why wouldn't this be working?&amp;nbsp; Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&lt;/P&gt;&lt;P&gt;Is there an easier way to copy code into this forum?&amp;nbsp; It seems I have to copy into Word first then copy and paste from there. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 14:17:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91585#M1758</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-14T14:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91586#M1759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question 1: declare the array epi_occur(20) as character.&amp;nbsp; I don't know how big your fields are, thus can't suggest the correct length, but something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;array &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;epi_occur(&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: 'Courier New'; color: teal; background-color: white;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;) $30.;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2: You are probably using IE.&amp;nbsp; With Google Chrome, the problem goes away.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 14:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91586#M1759</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-08-14T14:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Procedure Episode Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91587#M1760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course!&amp;nbsp; Thanks so much, Arthur, it worked as I'm sure you knew it would!!&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 16:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Adding-Procedure-Episode-Numbers/m-p/91587#M1760</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2012-08-14T16:11:34Z</dc:date>
    </item>
  </channel>
</rss>

