<?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 How to adjust claims amount and generate a series based ion amounts for eligible months in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/781993#M249259</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am working on a project where i have to adjust the claim amounts for certain scenarios and the data looks something like this&lt;BR /&gt;&lt;BR /&gt;Subscriber_id startdt enddt amount&lt;BR /&gt;1 1/12021 3/14/2021 200&lt;BR /&gt;1 3/15/2021 . 300&lt;BR /&gt;2 1/1/2021 1/14/2021 400&lt;BR /&gt;3 1/15/2021 . 500&lt;BR /&gt;&lt;BR /&gt;Now for subcriber_id =1 then amount should be adjusted using a calculation and the amount should be like&lt;BR /&gt;For the first two months the amount should be 200 for the next month it should be the calculated amount (ex 300/15) = 1500&lt;BR /&gt;And for rest of thw eligible months amount should be 300&lt;BR /&gt;&lt;BR /&gt;For subscriber id=2 the amount should just be the calculated for 14 days (which is the end date) and amount should be 400/14 =28.57&lt;BR /&gt;For subscriber_if=3 the amount should&lt;BR /&gt;be calculated for first 14 days like 500/14&lt;BR /&gt;And for rest of the eligible months it should be 500.&lt;BR /&gt;&lt;BR /&gt;I am trying to build a logic for the same but unable to do so.&lt;BR /&gt;Any help on this will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Nov 2021 16:19:47 GMT</pubDate>
    <dc:creator>Nimish28</dc:creator>
    <dc:date>2021-11-23T16:19:47Z</dc:date>
    <item>
      <title>How to adjust claims amount and generate a series based ion amounts for eligible months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/781993#M249259</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I am working on a project where i have to adjust the claim amounts for certain scenarios and the data looks something like this&lt;BR /&gt;&lt;BR /&gt;Subscriber_id startdt enddt amount&lt;BR /&gt;1 1/12021 3/14/2021 200&lt;BR /&gt;1 3/15/2021 . 300&lt;BR /&gt;2 1/1/2021 1/14/2021 400&lt;BR /&gt;3 1/15/2021 . 500&lt;BR /&gt;&lt;BR /&gt;Now for subcriber_id =1 then amount should be adjusted using a calculation and the amount should be like&lt;BR /&gt;For the first two months the amount should be 200 for the next month it should be the calculated amount (ex 300/15) = 1500&lt;BR /&gt;And for rest of thw eligible months amount should be 300&lt;BR /&gt;&lt;BR /&gt;For subscriber id=2 the amount should just be the calculated for 14 days (which is the end date) and amount should be 400/14 =28.57&lt;BR /&gt;For subscriber_if=3 the amount should&lt;BR /&gt;be calculated for first 14 days like 500/14&lt;BR /&gt;And for rest of the eligible months it should be 500.&lt;BR /&gt;&lt;BR /&gt;I am trying to build a logic for the same but unable to do so.&lt;BR /&gt;Any help on this will be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Nov 2021 16:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/781993#M249259</guid>
      <dc:creator>Nimish28</dc:creator>
      <dc:date>2021-11-23T16:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to adjust claims amount and generate a series based ion amounts for eligible months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/782056#M249293</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the example given, can you specify what should be the outcome (after data processing)?&lt;/P&gt;
&lt;P&gt;That would make it easier for me (us) to come up with an appropriate program for this!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 19:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/782056#M249293</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-11-23T19:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to adjust claims amount and generate a series based ion amounts for eligible months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/782065#M249299</link>
      <description>&lt;P&gt;I'm reasonably certain I don't understand your calculation method (months x rate but then rate divided by days- why???), but here is something to maybe get you thinking.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using Excel I can do this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="753"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;d&lt;/TD&gt;
&lt;TD&gt;e&lt;/TD&gt;
&lt;TD&gt;f&lt;/TD&gt;
&lt;TD&gt;g&lt;/TD&gt;
&lt;TD&gt;h&lt;/TD&gt;
&lt;TD&gt;i&lt;/TD&gt;
&lt;TD&gt;j&lt;/TD&gt;
&lt;TD&gt;k&lt;/TD&gt;
&lt;TD&gt;l&lt;/TD&gt;
&lt;TD&gt;m&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;subscriber&lt;/TD&gt;
&lt;TD width="87"&gt;start&lt;/TD&gt;
&lt;TD width="87"&gt;end&lt;/TD&gt;
&lt;TD width="64"&gt;amount&lt;/TD&gt;
&lt;TD width="97"&gt;now&lt;/TD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gt;1/15/2021&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD&gt;500&lt;/TD&gt;
&lt;TD&gt;11/23/2021&lt;/TD&gt;
&lt;TD&gt;10&lt;/TD&gt;
&lt;TD&gt;5000&lt;/TD&gt;
&lt;TD&gt;11&lt;/TD&gt;
&lt;TD&gt;45.45&lt;/TD&gt;
&lt;TD&gt;5045.45&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now is the end date or the current date where the end date is empty.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;= IF(F7, F7,NOW())&lt;/P&gt;
&lt;P&gt;mdiff is the difference between either the start and end or start and now in full months.&lt;/P&gt;
&lt;P&gt;=IF(F7,DATEDIF(E7,F7,"m"),DATEDIF(E7,H7,"m"))&lt;/P&gt;
&lt;P&gt;cam is a calculated monthly amount of full months times amount.&lt;/P&gt;
&lt;P&gt;=+I7*G7&lt;/P&gt;
&lt;P&gt;mddiff is the difference&amp;nbsp;between either the start and end or start and now in days minus the full months.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=IF(F7,DATEDIF(E7,F7,"md")+1, DATEDIF(E7,H7,"md")+1)&lt;/P&gt;
&lt;P&gt;cdam is the calculated daily amount&lt;/P&gt;
&lt;P&gt;=+G7/K7&lt;/P&gt;
&lt;P&gt;tam is total amount and sum of cam and cdam&lt;/P&gt;
&lt;P&gt;=+J7+L7&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With data modified like that, I think the complete charge per subscriber is the sum of tam grouped by subscriber, which can be done with Proc Summary or Proc SQL or something.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp; Apparently there are issues with MD.&amp;nbsp; Who knew? Looks fixable.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.microsoft.com/en-us/office/datedif-function-25dba1a4-2812-480b-84dd-8b32a451b35c" target="_blank"&gt;https://support.microsoft.com/en-us/office/datedif-function-25dba1a4-2812-480b-84dd-8b32a451b35c&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 21:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/782065#M249299</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2021-11-23T21:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to adjust claims amount and generate a series based ion amounts for eligible months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/782110#M249310</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attaching a excel for reference. Please have a look at it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 03:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-adjust-claims-amount-and-generate-a-series-based-ion/m-p/782110#M249310</guid>
      <dc:creator>Nimish28</dc:creator>
      <dc:date>2021-11-24T03:18:55Z</dc:date>
    </item>
  </channel>
</rss>

