<?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 do I identify the index date based on line of therapy definitions? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800739#M315052</link>
    <description>&lt;P&gt;Hi, I'm very new to SAS and it would be great if someone can suggest some solutions because I just can't think of any.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Background:&lt;/STRONG&gt; I'm using the IBM MarketScan data for my project and I need to identify index dates based on people's exposure to different drug classes.&amp;nbsp;So far, I have cut my data down to people who have claims for receiving all drug classes of interest during the study period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&amp;nbsp;Now, I need some help with the following questions,&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) How do you create an algorithm or macros for a line of therapy (LOT) and apply the algorithm to each patient?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;LOT Definitions&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In general, a LOT consists of ≥ 1 complete cycle of one of the following,&lt;UL&gt;&lt;LI&gt;Single drug or&lt;/LI&gt;&lt;LI&gt;A regimen that consists of a combination of different drugs&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If one of the following conditions are met, it will be considered as an advancement in LOT&lt;UL&gt;&lt;LI&gt;All drugs of an existing regimen are discontinued, and a new regimen of different combinations of drugs is initiated&lt;/LI&gt;&lt;LI&gt;Unplanned addition or substitution of a new drug to an existing regimen&lt;/LI&gt;&lt;LI&gt;If the previously discontinued regimen is restarted later, the restarted regimen will be counted as a new LOT if&lt;UL&gt;&lt;LI&gt;There is evidence of ≥ 1 other regimen administered in between the discontinued period&lt;/LI&gt;&lt;LI&gt;The regimen is modified through the addition of ≥1 drug&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The following conditions do not meet the criteria for the advancement of LOT definition and will be considered as a single LOT,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If a LOT is interrupted or discontinued for any reason and the same LOT is restarted &amp;lt;60 days after without any evidence of receiving other intervening LOT in between the gap&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Once the LOT definition algorithms have been applied for each patient, I will need to identify the index date for each patient. The index date is defined as the first date of receiving a new LOT after completing a line of therapy with all three drug classes.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For example,&lt;UL&gt;&lt;LI&gt;Patient A completed the first LOT containing drug class A + B,&lt;/LI&gt;&lt;LI&gt;Then advanced to the second LOT containing drug class C based on the definitions above,&lt;/LI&gt;&lt;LI&gt;Then advanced to the third LOT containing drug class A + C&lt;UL&gt;&lt;LI&gt;The first date of starting this LOT will be considered the index date&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of my current dataset looks like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&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gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;05/16/2015&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the table above, the index date would be 05/16/2015. Then, I would like my new table to contain the same information, but contain claims after the index date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can provide me with some ideas on how to get started, that would be greatly appreciated. Please let me know if you need more information from me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 21:29:05 GMT</pubDate>
    <dc:creator>jsyang56</dc:creator>
    <dc:date>2022-03-07T21:29:05Z</dc:date>
    <item>
      <title>How do I identify the index date based on line of therapy definitions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800739#M315052</link>
      <description>&lt;P&gt;Hi, I'm very new to SAS and it would be great if someone can suggest some solutions because I just can't think of any.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Background:&lt;/STRONG&gt; I'm using the IBM MarketScan data for my project and I need to identify index dates based on people's exposure to different drug classes.&amp;nbsp;So far, I have cut my data down to people who have claims for receiving all drug classes of interest during the study period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&amp;nbsp;Now, I need some help with the following questions,&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) How do you create an algorithm or macros for a line of therapy (LOT) and apply the algorithm to each patient?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;LOT Definitions&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In general, a LOT consists of ≥ 1 complete cycle of one of the following,&lt;UL&gt;&lt;LI&gt;Single drug or&lt;/LI&gt;&lt;LI&gt;A regimen that consists of a combination of different drugs&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If one of the following conditions are met, it will be considered as an advancement in LOT&lt;UL&gt;&lt;LI&gt;All drugs of an existing regimen are discontinued, and a new regimen of different combinations of drugs is initiated&lt;/LI&gt;&lt;LI&gt;Unplanned addition or substitution of a new drug to an existing regimen&lt;/LI&gt;&lt;LI&gt;If the previously discontinued regimen is restarted later, the restarted regimen will be counted as a new LOT if&lt;UL&gt;&lt;LI&gt;There is evidence of ≥ 1 other regimen administered in between the discontinued period&lt;/LI&gt;&lt;LI&gt;The regimen is modified through the addition of ≥1 drug&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;The following conditions do not meet the criteria for the advancement of LOT definition and will be considered as a single LOT,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If a LOT is interrupted or discontinued for any reason and the same LOT is restarted &amp;lt;60 days after without any evidence of receiving other intervening LOT in between the gap&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Once the LOT definition algorithms have been applied for each patient, I will need to identify the index date for each patient. The index date is defined as the first date of receiving a new LOT after completing a line of therapy with all three drug classes.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For example,&lt;UL&gt;&lt;LI&gt;Patient A completed the first LOT containing drug class A + B,&lt;/LI&gt;&lt;LI&gt;Then advanced to the second LOT containing drug class C based on the definitions above,&lt;/LI&gt;&lt;LI&gt;Then advanced to the third LOT containing drug class A + C&lt;UL&gt;&lt;LI&gt;The first date of starting this LOT will be considered the index date&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An example of my current dataset looks like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Date of service&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;Drug class received&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/13/2015&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/13/2015&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/21/2015&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/21/2015&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;02/05/2015&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;02/05/2015&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;04/01/2015&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;04/15/2015&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;04/27/2015&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;05/16/2015&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;05/16/2015&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the table above, the index date would be 05/16/2015. Then, I would like my new table to contain the same information, but contain claims after the index date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone can provide me with some ideas on how to get started, that would be greatly appreciated. Please let me know if you need more information from me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 21:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800739#M315052</guid>
      <dc:creator>jsyang56</dc:creator>
      <dc:date>2022-03-07T21:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I identify the index date based on line of therapy definitions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800937#M315162</link>
      <description>&lt;P&gt;Using your current dataset as a base, please provide an example of what the desired dataset would look like.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 20:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800937#M315162</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-03-08T20:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I identify the index date based on line of therapy definitions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800938#M315163</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I actually posted the same question in a different format for clarity. So, could you please help me figure out the answer to this question?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to the post:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-identify-observed-claims-within-a-period-of-time/m-p/800923" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-identify-observed-claims-within-a-period-of-time/m-p/800923&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 20:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-identify-the-index-date-based-on-line-of-therapy/m-p/800938#M315163</guid>
      <dc:creator>jsyang56</dc:creator>
      <dc:date>2022-03-08T20:24:38Z</dc:date>
    </item>
  </channel>
</rss>

