<?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: Exclude a Claim based on multiple conditions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627262#M185115</link>
    <description>An elegant solution. thank you!</description>
    <pubDate>Tue, 25 Feb 2020 18:16:51 GMT</pubDate>
    <dc:creator>127</dc:creator>
    <dc:date>2020-02-25T18:16:51Z</dc:date>
    <item>
      <title>Exclude a Claim based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/626960#M184979</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking to create a new dataset with the "whole" claim for specific Procedure Code G102 or G103 as being "denied" based on the date of service (DOS).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help with SAS code would be great!&amp;nbsp; Here's an example with fake data:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Clm1stDOS&lt;/TD&gt;&lt;TD&gt;ProcCode&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;WantData&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;11/1/2015&lt;/TD&gt;&lt;TD&gt;G102&lt;/TD&gt;&lt;TD&gt;Paid&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Keep&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;11/1/2015&lt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gt;</description>
      <pubDate>Mon, 24 Feb 2020 18:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/626960#M184979</guid>
      <dc:creator>127</dc:creator>
      <dc:date>2020-02-24T18:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a Claim based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/626966#M184983</link>
      <description>&lt;P&gt;I don't understand the logic here. Can you be a bit more specific?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 18:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/626966#M184983</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-02-24T18:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a Claim based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627030#M185007</link>
      <description>&lt;P&gt;Claim with the same DOS can have multiple lines with same or different proc codes and sometimes they get paid and sometimes denied. I want to group the claim as a "whole claim" by their DOS and ProcCode then if the whole claim for the same DOS and same Proc code got denied every time then I want to exclude into separate database.&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 Feb 2020 20:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627030#M185007</guid>
      <dc:creator>127</dc:creator>
      <dc:date>2020-02-24T20:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a Claim based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627038#M185009</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/180186"&gt;@127&lt;/a&gt;&amp;nbsp; By any chance, you are after this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID	Clm1stDOS :mmddyy10.	(ProcCode	Status) ($);*	WantData;
format Clm1stDOS mmddyy10.;
cards;
10	11/1/2015	G102	Paid 	Keep
10	11/1/2015	G102	Paid 	Keep
10	11/1/2015	G102	Denied  	Keep
10	12/18/2015	G102	Paid 	Keep
10	12/18/2015	G103	Denied 	new dataset
10	12/20/2015	G103	Paid	keep
10	12/20/2015	G102	Denied 	new dataset
10	12/20/2015	G102	Denied 	new dataset
;

data keep new;
 do _n_=1 by 1 until(last.ProcCode);
  set have;
  by id Clm1stDOS ProcCode notsorted;
  if status='Denied' then _n=sum(_n,1);
 end;
 if _n_=_n then  _f=1;
 do _n_=1 to _n_;
  set have;
  if _f then output new;
  else output keep;
 end;
 drop _:;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Feb 2020 21:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627038#M185009</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-02-24T21:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude a Claim based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627262#M185115</link>
      <description>An elegant solution. thank you!</description>
      <pubDate>Tue, 25 Feb 2020 18:16:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-a-Claim-based-on-multiple-conditions/m-p/627262#M185115</guid>
      <dc:creator>127</dc:creator>
      <dc:date>2020-02-25T18:16:51Z</dc:date>
    </item>
  </channel>
</rss>

