<?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 need help with TEAE flag logic in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/need-help-with-TEAE-flag-logic/m-p/438524#M2496</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to create flag for below logic in SAS SDTM AE Domain. Could you please help me with the logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if aestdtc&amp;lt;rfstdtc&amp;nbsp; and patient has another record with same AEDECOD and AETERM , and AESEV increased need to flag as Y.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to sas need a sample code for this logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!!!&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 00:00:12 GMT</pubDate>
    <dc:creator>sasg</dc:creator>
    <dc:date>2018-02-20T00:00:12Z</dc:date>
    <item>
      <title>need help with TEAE flag logic</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/need-help-with-TEAE-flag-logic/m-p/438524#M2496</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to create flag for below logic in SAS SDTM AE Domain. Could you please help me with the logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if aestdtc&amp;lt;rfstdtc&amp;nbsp; and patient has another record with same AEDECOD and AETERM , and AESEV increased need to flag as Y.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm new to sas need a sample code for this logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!!!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 00:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/need-help-with-TEAE-flag-logic/m-p/438524#M2496</guid>
      <dc:creator>sasg</dc:creator>
      <dc:date>2018-02-20T00:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: need help with TEAE flag logic</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/need-help-with-TEAE-flag-logic/m-p/438531#M2497</link>
      <description>&lt;P&gt;Presumably you have a variable representing the date.&amp;nbsp; You would need to put the data in the proper order first:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=have;&lt;/P&gt;
&lt;P&gt;by patient aedecod aeterm date;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then check your conditions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;by patient aedecod aeterm;&lt;/P&gt;
&lt;P&gt;prior_severity = lag(aesev);&lt;/P&gt;
&lt;P&gt;if first.aeterm=0 and (aesev &amp;gt; prior_severity) and (aestdtc &amp;lt; rfstdtc) then flag='Y';&lt;/P&gt;
&lt;P&gt;drop prior_severity;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As someone relatively new to SAS, there are several topics you will need to learn, to understand the program.&amp;nbsp; Start with the addition of a BY statement following the SET statement.&amp;nbsp; It's something you will use regularly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, however, see if this flags the observations that you are hoping to flag.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 01:05:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/need-help-with-TEAE-flag-logic/m-p/438531#M2497</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-20T01:05:25Z</dc:date>
    </item>
  </channel>
</rss>

