<?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 Random PII Anonymizer in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/481602#M124605</link>
    <description>&lt;P&gt;I thought I'd share a technique for anonymizing&amp;nbsp;&lt;SPAN&gt;Personally Identifiable Information&lt;/SPAN&gt; data while maintaining field lengths (random x digit number):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Found this macro at&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro RandBetween(min, max);&lt;BR /&gt; (&amp;amp;min + floor((1+&amp;amp;max-&amp;amp;min)*rand("uniform")))&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and so this is what I came up with to randomize PII (claim numbers, medicaid IDs, NPIs)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql; create table foon as &lt;BR /&gt; SELECT %RandBetween(10**12, (10**13)-1) as CLCL_ID, &lt;BR /&gt; t1.hcas, &lt;BR /&gt; t1.hcss, &lt;BR /&gt; t1.hcep, &lt;BR /&gt; t1.hcaps, &lt;BR /&gt; %RandBetween(10**13, (10**14)-1) as MEDICAID_ID, &lt;BR /&gt;t1.lbpi, &lt;BR /&gt; %RandBetween(10**11, (10**12)-1) as BILL_PROV_NPI, &lt;BR /&gt; %RandBetween(10**11, (10**12)-1) as SERV_PROV_NPI, &lt;BR /&gt; t1.MIN_of_Line_FROM_DT, &lt;BR /&gt; t1.MAX_of_Line_TO_DT, &lt;BR /&gt; t1.CLCL_RECD_DT, &lt;BR /&gt; t1.dcabtmco, &lt;BR /&gt; t1.dcpbtm, &lt;BR /&gt; t1.SUM_of_CDML_CHG_AMT, &lt;BR /&gt; t1.SUM_of_CDML_PR_PYMT_AMT&lt;BR /&gt; FROM WORK.FOO t1;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just thought I'd pass it on...maybe it'll be of use to others.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Aug 2018 11:55:26 GMT</pubDate>
    <dc:creator>tomrvincent</dc:creator>
    <dc:date>2018-08-01T11:55:26Z</dc:date>
    <item>
      <title>Random PII Anonymizer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/481602#M124605</link>
      <description>&lt;P&gt;I thought I'd share a technique for anonymizing&amp;nbsp;&lt;SPAN&gt;Personally Identifiable Information&lt;/SPAN&gt; data while maintaining field lengths (random x digit number):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Found this macro at&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2015/10/05/random-integers-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro RandBetween(min, max);&lt;BR /&gt; (&amp;amp;min + floor((1+&amp;amp;max-&amp;amp;min)*rand("uniform")))&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and so this is what I came up with to randomize PII (claim numbers, medicaid IDs, NPIs)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql; create table foon as &lt;BR /&gt; SELECT %RandBetween(10**12, (10**13)-1) as CLCL_ID, &lt;BR /&gt; t1.hcas, &lt;BR /&gt; t1.hcss, &lt;BR /&gt; t1.hcep, &lt;BR /&gt; t1.hcaps, &lt;BR /&gt; %RandBetween(10**13, (10**14)-1) as MEDICAID_ID, &lt;BR /&gt;t1.lbpi, &lt;BR /&gt; %RandBetween(10**11, (10**12)-1) as BILL_PROV_NPI, &lt;BR /&gt; %RandBetween(10**11, (10**12)-1) as SERV_PROV_NPI, &lt;BR /&gt; t1.MIN_of_Line_FROM_DT, &lt;BR /&gt; t1.MAX_of_Line_TO_DT, &lt;BR /&gt; t1.CLCL_RECD_DT, &lt;BR /&gt; t1.dcabtmco, &lt;BR /&gt; t1.dcpbtm, &lt;BR /&gt; t1.SUM_of_CDML_CHG_AMT, &lt;BR /&gt; t1.SUM_of_CDML_PR_PYMT_AMT&lt;BR /&gt; FROM WORK.FOO t1;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just thought I'd pass it on...maybe it'll be of use to others.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 11:55:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/481602#M124605</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-08-01T11:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Random PII Anonymizer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/481733#M124671</link>
      <description>&lt;P&gt;Thank you for this contribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To make it more useful, you could change the title to something like:&lt;/P&gt;
&lt;P&gt;Here is a method to anonymise Personally Identifiable Information (PII)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This highlights that you are proposing a solution (rather than asking a question), and explains PII, which will not be a term familiar to everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 23:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/481733#M124671</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-26T23:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Random PII Anonymizer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/482579#M125026</link>
      <description>If only there was an option to post a solution/suggestion instead of just 'ask a question'!</description>
      <pubDate>Mon, 30 Jul 2018 19:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/482579#M125026</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2018-07-30T19:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Random PII Anonymizer</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/482620#M125039</link>
      <description>&lt;P&gt;In the meantime a good title is the best way imho.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jul 2018 21:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Random-PII-Anonymizer/m-p/482620#M125039</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-07-30T21:35:34Z</dc:date>
    </item>
  </channel>
</rss>

