<?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: How to identify unique recipients of 5 classes of psychotropic meds in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931070#M366304</link>
    <description>That sounds good.&amp;nbsp; There will be something ready to go tomorrow.Thank you.&lt;BR /&gt;</description>
    <pubDate>Wed, 05 Jun 2024 22:44:39 GMT</pubDate>
    <dc:creator>wlierman</dc:creator>
    <dc:date>2024-06-05T22:44:39Z</dc:date>
    <item>
      <title>How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930866#M366230</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question pertaining to how to identify unique recipients (by recipient id) across 5 classes of psychotropic meds for two years (2022 and 2023) of quarterly data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The set up is as follows:&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; med1&amp;nbsp; med2 med3 med4&amp;nbsp; med5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; med1&amp;nbsp; med2&amp;nbsp; med3&amp;nbsp; med4&amp;nbsp; med5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Q1 2022&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Q1 2023&lt;/P&gt;
&lt;P&gt;Q2 2022&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Q2 2023&lt;/P&gt;
&lt;P&gt;Q3 2022&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Q3 2023&lt;/P&gt;
&lt;P&gt;Q4 2022&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Q4 2023&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The steps that I follow:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1] vertically combine the quarters into CY 2022 and 2023.&lt;/P&gt;
&lt;P&gt;2]starting with med1 as the 'base' med check across each of the 5 med types to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; identify only unique recipients. The data requestor only wants to count each&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; recipient once across the med classes.&lt;/P&gt;
&lt;P&gt;3] So the final output would give the following for all recipients of both years&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2022&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; med1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; med2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; med3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; med4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; med5&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; unique #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;unique #&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... and so on ........... &amp;nbsp;&amp;nbsp;&amp;nbsp;&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; of recipient&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; of recipients&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then the same for 2023.&amp;nbsp;&amp;nbsp; The output would be to spread all unique recipients across the 5 classes of meds for both years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I originally thought of an sql approach, having seen sql solutions on stack overflow blogs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expert solutions would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Walt Lierman&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 21:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930866#M366230</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2024-06-04T21:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930870#M366231</link>
      <description>&lt;P&gt;This will probably go much quicker if you provide an example what your current data looks like. The values don't have to be exact, just behave the same. Since your question involves "unique recipients" that means there has to be some way of identifying the recipient as well as the meds and apparently date information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then from the example show what the result should look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example data is best provided as data step code that we can run pasted into a text box opened on this forum using the &amp;lt;/&amp;gt; icon that appears above the message window.&lt;/P&gt;
&lt;P&gt;A brief possible example:&lt;/P&gt;
&lt;PRE&gt;data have;
  input patientid $   date :date9. med $;
  format date date9.;
datalines;
1111   01Jan2022   abc
1111   05Feb2022   pdq
2222   04Jan2022   xyzanol
;&lt;/PRE&gt;
&lt;P&gt;I would recommend for the example to use dummy medication names as above. Actual names can have issues besides length and how much typing would be involved. You question involves 5 meds but you could likely do with 3 for the example. Then show how you expect the report to run for your provided example data.&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>Tue, 04 Jun 2024 22:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930870#M366231</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-04T22:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930871#M366232</link>
      <description>Sounds reasonable.&amp;nbsp; Will take a little bit.&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;#- Please type your reply above this line. No attachments. -##</description>
      <pubDate>Tue, 04 Jun 2024 22:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930871#M366232</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2024-06-04T22:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930875#M366234</link>
      <description>&lt;P&gt;If your data does not have a recipient ID variable, how do you propose to identify unique recipient?&amp;nbsp; Is each pattern of MED1 through MED5 unique to only one individual?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 00:47:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/930875#M366234</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-06-05T00:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931064#M366299</link>
      <description>My oversight: there is a recipient ID on each record.&amp;nbsp; The data was retrieved from a datawarehouse and duplicates could be checked vertically through each month of the quarter - some other preprocessing steps were also applied.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;The requestor wants unique recipients across each med type.&amp;nbsp; So this deduplication is across the five meds in a horizontal direction.&lt;BR /&gt;I will try to provide some data from the dataset.&amp;nbsp; It will take some time to avoid sending potentially sensitive information.&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Jun 2024 22:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931064#M366299</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2024-06-05T22:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931068#M366302</link>
      <description>&lt;P&gt;If my previous example data step has elements similar to your data then just make stuff up like that. Just provide a few records and as I mentioned before likely only need 3 "med" values to play with. Likely 15 to 20 lines of data should be sufficient to get started as long as you show what the expected result for those would be. Please make sure that not every value in the output example has the same count, it should be possible to see that pretty easily for as small of an example as I suggest.&lt;/P&gt;
&lt;P&gt;Some patients should not have some of the "med" values.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 22:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931068#M366302</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-06-05T22:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify unique recipients of 5 classes of psychotropic meds</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931070#M366304</link>
      <description>That sounds good.&amp;nbsp; There will be something ready to go tomorrow.Thank you.&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Jun 2024 22:44:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-identify-unique-recipients-of-5-classes-of-psychotropic/m-p/931070#M366304</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2024-06-05T22:44:39Z</dc:date>
    </item>
  </channel>
</rss>

