<?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: Create a dataset with periods of treatment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718450#M222356</link>
    <description>&lt;P&gt;Please provide the logical rules to create the second data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359116"&gt;@cuan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Dear Sas Community,&lt;BR /&gt;&lt;BR /&gt;have the next problem, it is not trivial, please try to give me the dataset I am asking for below. Thank you very much in advance.&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input id treat date: date9.;&lt;BR /&gt;format date date9.;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 16oct2017&lt;BR /&gt;1 1 30oct2017&lt;BR /&gt;1 2 14nov2017&lt;BR /&gt;1 2 26nov2017&lt;BR /&gt;1 2 27nov2017&lt;BR /&gt;1 1 11dec2017&lt;BR /&gt;1 2 12dec2017&lt;BR /&gt;1 2 13dec2017&lt;BR /&gt;1 2 24dec2017&lt;BR /&gt;1 2 25dec2017&lt;BR /&gt;1 1 27dec2017&lt;BR /&gt;1 2 09jan2018&lt;BR /&gt;2 1 16oct2017&lt;BR /&gt;2 1 30oct2017&lt;BR /&gt;2 2 14nov2017&lt;BR /&gt;2 2 26nov2017&lt;BR /&gt;2 2 27nov2017&lt;BR /&gt;2 1 11dec2017&lt;BR /&gt;2 2 12dec2017&lt;BR /&gt;2 2 24dec2017&lt;BR /&gt;2 2 25dec2017&lt;BR /&gt;2 1 27dec2017&lt;BR /&gt;2 2 09jan2018&lt;BR /&gt;2 2 10jan2018&lt;BR /&gt;2 2 11jan2018&lt;BR /&gt;2 2 22jan2018&lt;BR /&gt;2 1 05feb2018&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I need a dataset want:&lt;BR /&gt;&lt;BR /&gt;subjid treat start stop&lt;BR /&gt;1 1 16oct2017 13nov2017&lt;BR /&gt;1 1 28nov2017 11dec2017&lt;BR /&gt;1 1 26dec2017 08jan2017&lt;BR /&gt;2 1 16oct2017 13nov2017&lt;BR /&gt;2 1 28nov2017 11dec2017&lt;BR /&gt;2 1 26dec2017 08jan2017&lt;BR /&gt;2 1 23jan2018 05feb2018&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;BR /&gt;&lt;BR /&gt;Cuan.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 01:46:17 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-02-11T01:46:17Z</dc:date>
    <item>
      <title>Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718449#M222355</link>
      <description>Dear Sas Community,&lt;BR /&gt;&lt;BR /&gt;have the next problem, it is not trivial, please try to give me the dataset I am asking for below. Thank you very much in advance.&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input id treat date: date9.;&lt;BR /&gt;format date date9.;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 16oct2017&lt;BR /&gt;1 1 30oct2017&lt;BR /&gt;1 2 14nov2017&lt;BR /&gt;1 2 26nov2017&lt;BR /&gt;1 2 27nov2017&lt;BR /&gt;1 1 11dec2017&lt;BR /&gt;1 2 12dec2017&lt;BR /&gt;1 2 13dec2017&lt;BR /&gt;1 2 24dec2017&lt;BR /&gt;1 2 25dec2017&lt;BR /&gt;1 1 27dec2017&lt;BR /&gt;1 2 09jan2018&lt;BR /&gt;2 1 16oct2017&lt;BR /&gt;2 1 30oct2017&lt;BR /&gt;2 2 14nov2017&lt;BR /&gt;2 2 26nov2017&lt;BR /&gt;2 2 27nov2017&lt;BR /&gt;2 1 11dec2017&lt;BR /&gt;2 2 12dec2017&lt;BR /&gt;2 2 24dec2017&lt;BR /&gt;2 2 25dec2017&lt;BR /&gt;2 1 27dec2017&lt;BR /&gt;2 2 09jan2018&lt;BR /&gt;2 2 10jan2018&lt;BR /&gt;2 2 11jan2018&lt;BR /&gt;2 2 22jan2018&lt;BR /&gt;2 1 05feb2018&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I need a dataset want:&lt;BR /&gt;&lt;BR /&gt;subjid treat start stop&lt;BR /&gt;1 1 16oct2017 13nov2017&lt;BR /&gt;1 1 28nov2017 11dec2017&lt;BR /&gt;1 1 26dec2017 08jan2017&lt;BR /&gt;2 1 16oct2017 13nov2017&lt;BR /&gt;2 1 28nov2017 11dec2017&lt;BR /&gt;2 1 26dec2017 08jan2017&lt;BR /&gt;2 1 23jan2018 05feb2018&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;BR /&gt;&lt;BR /&gt;Cuan.</description>
      <pubDate>Thu, 11 Feb 2021 01:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718449#M222355</guid>
      <dc:creator>cuan</dc:creator>
      <dc:date>2021-02-11T01:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718450#M222356</link>
      <description>&lt;P&gt;Please provide the logical rules to create the second data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359116"&gt;@cuan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Dear Sas Community,&lt;BR /&gt;&lt;BR /&gt;have the next problem, it is not trivial, please try to give me the dataset I am asking for below. Thank you very much in advance.&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;input id treat date: date9.;&lt;BR /&gt;format date date9.;&lt;BR /&gt;cards;&lt;BR /&gt;1 1 16oct2017&lt;BR /&gt;1 1 30oct2017&lt;BR /&gt;1 2 14nov2017&lt;BR /&gt;1 2 26nov2017&lt;BR /&gt;1 2 27nov2017&lt;BR /&gt;1 1 11dec2017&lt;BR /&gt;1 2 12dec2017&lt;BR /&gt;1 2 13dec2017&lt;BR /&gt;1 2 24dec2017&lt;BR /&gt;1 2 25dec2017&lt;BR /&gt;1 1 27dec2017&lt;BR /&gt;1 2 09jan2018&lt;BR /&gt;2 1 16oct2017&lt;BR /&gt;2 1 30oct2017&lt;BR /&gt;2 2 14nov2017&lt;BR /&gt;2 2 26nov2017&lt;BR /&gt;2 2 27nov2017&lt;BR /&gt;2 1 11dec2017&lt;BR /&gt;2 2 12dec2017&lt;BR /&gt;2 2 24dec2017&lt;BR /&gt;2 2 25dec2017&lt;BR /&gt;2 1 27dec2017&lt;BR /&gt;2 2 09jan2018&lt;BR /&gt;2 2 10jan2018&lt;BR /&gt;2 2 11jan2018&lt;BR /&gt;2 2 22jan2018&lt;BR /&gt;2 1 05feb2018&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I need a dataset want:&lt;BR /&gt;&lt;BR /&gt;subjid treat start stop&lt;BR /&gt;1 1 16oct2017 13nov2017&lt;BR /&gt;1 1 28nov2017 11dec2017&lt;BR /&gt;1 1 26dec2017 08jan2017&lt;BR /&gt;2 1 16oct2017 13nov2017&lt;BR /&gt;2 1 28nov2017 11dec2017&lt;BR /&gt;2 1 26dec2017 08jan2017&lt;BR /&gt;2 1 23jan2018 05feb2018&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;BR /&gt;&lt;BR /&gt;Cuan.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 01:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718450#M222356</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-11T01:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718452#M222357</link>
      <description>If you can see, I need to know when these patients is taking only treatment&lt;BR /&gt;1 (is a drug called A) , treatment 2 is a combinación drug, called (A+B).&lt;BR /&gt;I only interested in the period the patient is taking treatment 1 (mono&lt;BR /&gt;therapy drug A).&lt;BR /&gt;&lt;BR /&gt;I hope it is clear.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Feb 2021 01:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718452#M222357</guid>
      <dc:creator>cuan</dc:creator>
      <dc:date>2021-02-11T01:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718455#M222359</link>
      <description>&lt;P&gt;What does the date variable mean?&lt;/P&gt;
&lt;P&gt;Does it mean that a person started taking treatment1/2 at this time?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand this portion:&lt;/P&gt;
&lt;P&gt;Original Data:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1 2 27nov2017&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 1 11dec2017&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Desired data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;1 1 28nov2017 11dec2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why is the start Nov 28, one day after Treatment2 starts? It seems like Treatment A, didn't start again until 11 December.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 11 Feb 2021 02:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718455#M222359</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-11T02:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718490#M222370</link>
      <description>&lt;P&gt;Please check next code, though the result is not as expected:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=ID treat date rename=(svid=ID svtrt=treat));
 set have end=eof;
  by ID notsorted treat;
     retain svid svtrt start;
     format start stop date9.;
     if _N_ = 1 then do;
        svid  = ID;
        svtrt = treat;
        start = date;
     end;
     if first.treat and _N_&amp;gt;1 then do;
        stop = date-1;
        if svtrt = 1 then output;
        svid  = ID;
        svtrt = treat;
        start = date;
     end;
     if last.ID then do;
        stop=date;
        if svtrt = 1 then output;
     end;
run;
proc sort data=want; by ID treat; run;     
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2021 06:57:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718490#M222370</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-02-11T06:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718522#M222386</link>
      <description>Hi Reza,&lt;BR /&gt;The treat =2, is that patient is taking a combination of drugs (A+B) , I mean this patient is taking daily Drug A, but for some specific periods he takes an extra Drug B.&lt;BR /&gt;Then, that portion means:&lt;BR /&gt;1 2 27nov2017&lt;BR /&gt;1 1 11dec2017&lt;BR /&gt;&lt;BR /&gt;The patient is taking the combination of drugs that day 27 (A+B) , and stop. Then next day (day 28) he is taking the daily drug A, until 11 dec2017, because not more treatment 2 in that period.&lt;BR /&gt;The logic is, when the patient is not taking treatment 2 (combination treatment A+B) automatically we know he is taking only treatment 1(drug A) . I hope it is more clear now. It is not easy task , that’s why I ask you to solve. I hope you can find a solution. Thanks.</description>
      <pubDate>Thu, 11 Feb 2021 10:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718522#M222386</guid>
      <dc:creator>cuan</dc:creator>
      <dc:date>2021-02-11T10:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718576#M222408</link>
      <description>&lt;P&gt;I adapted my code to your last explanation and answer to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp; to get the wanted results:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=ID treat date rename=(svid=ID svtrt=treat));
 set have end=eof;
  by ID notsorted treat;
     retain svid svtrt start;
     format start stop date9.;
     if _N_ = 1 or first.ID then do;
        svid  = ID;
        svtrt = treat;
        start = date;
     end; 
     else do;
	     if treat=2 then do;
	        if svtrt=1 then do;
		       stop = date-1;
		       output;
		    end;
	        svtrt=2;
	     end; else svtrt=1;
	     if treat=2 and last.treat then start=date+1;
	     if first.treat then svtreat=treat;
	     if last.ID then do;
	        stop=date;
	        if svtrt = 1 then output;
	     end;
	 end;
run;
proc sort data=want; by ID treat; run;     
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Feb 2021 13:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718576#M222408</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2021-02-11T13:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718648#M222430</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359116"&gt;@cuan&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's another, independently developed solution, so you can validate one against the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Create larger test dataset */

data have(drop=phase);
call streaminit(27182818);
do id=1 to 50000;
  date='01JAN2000'd+rand('integer',10);
  do phase=1 to rand('integer',50);
    treat=rand('table',0.5);
    output;
    date+rand('integer',1,50); /* "('integer',0,50)" would cause ambiguities */
  end;
end;
format date date9.;
run;

/* Create dataset with periods of treatment 1 */

data want(drop=date _: rename=(id=subjid));
array _t[%sysevalf('01JAN2000'd):%eval(%sysfunc(today())+100)] _temporary_;
do until(last.id);
  set have;
  by id date;
  if first.id then _first_trt1=date;
  if treat~=1 then do;
    if _trt2_b=. then _trt2_b=date;
    _trt2_e=date;
  end;
  if _trt2_e&amp;gt;. &amp;amp; (treat=1 | last.id) then do;
    do _d=_trt2_b to _trt2_e;
      _t[_d]=2;
    end;
    call missing(of _trt2:);
  end;
end;
do _d=_first_trt1 to date;
  if _t[_d]=. then _t[_d]=1;
end;
do _d=lbound(_t)+1 to hbound(_t)-1;
  if _t[_d]=1 then do;
    if _t[_d-1]~=1 then start=_d;
    if _t[_d+1]~=1 then stop=_d;
  end;
  if n(start, stop)=2 then do;
    treat=1;
    output;
    call missing(start, stop);
  end;
end;
call missing(of _t[*]);
format start stop date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It's less elegant than&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;'s and also much slower on the large HAVE dataset created above (with more than one million observations). If your real dataset is much smaller (say, 1,000 patients, not 50,000), we're talking about fractions of a second, though. You can also improve performance by choosing more realistic lower and upper bounds&amp;nbsp;(based on your data) for the temporary array &lt;FONT face="courier new,courier"&gt;_t&lt;/FONT&gt;, which just needs to cover all of your treatment dates +/- 1 day (which I assumed to fall between January 1, 2000 and 100 days from today).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the resulting WANT datasets do &lt;STRONG&gt;not&lt;/STRONG&gt; match for the large HAVE input dataset. Maybe they &lt;EM&gt;do&lt;/EM&gt; with your real data because certain rare situations (like a patient treated only one day, with &lt;FONT face="courier new,courier"&gt;treat=1&lt;/FONT&gt;) don't occur in your data. You may want to check a few of the discrepancies (e.g. the single date difference for ID=6 of my simulated HAVE dataset) to get an idea of whether they are relevant for your application. The "ambiguities" mentioned in the comment above would arise if duplicate dates were allowed within an ID in dataset HAVE (e.g., two observations with the same ID and date, one with &lt;FONT face="courier new,courier"&gt;treat=1&lt;/FONT&gt; and one with &lt;FONT face="courier new,courier"&gt;treat=2&lt;/FONT&gt;; it's not obvious what this would imply for the treatment on the preceding days, after an observation with &lt;FONT face="courier new,courier"&gt;treat=2&lt;/FONT&gt;). This would also cause more discrepancies between the WANT datasets of the two solutions.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 16:14:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718648#M222430</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-02-11T16:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718657#M222437</link>
      <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;It was a challenging one.&lt;/P&gt;&lt;P&gt;Cuan.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 16:34:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718657#M222437</guid>
      <dc:creator>cuan</dc:creator>
      <dc:date>2021-02-11T16:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718660#M222440</link>
      <description>&lt;P&gt;The reason that doesn't make sense to me is that you use the exact opposite logic in the first two records where the A is assumed to carry forward, but here you're saying it doesn't carry forward.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1 1 16oct2017 &lt;STRONG&gt;13nov2017&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I can see this is based on the date that is prior the drug regiment changing. So it seems like the logic isn't consistent to me.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 16:39:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718660#M222440</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-11T16:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718661#M222441</link>
      <description>&lt;P&gt;Hello dear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much for your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I compared it in my real data (10 patients), and I have patient took mono only 1 day, and&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&amp;nbsp; code is working&amp;nbsp; perfectly for this case also very well, that's&amp;nbsp;&amp;nbsp;why I gave him the valid solution, because it is&amp;nbsp; working great&lt;/P&gt;&lt;P&gt;in my real data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cuan.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 16:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718661#M222441</guid>
      <dc:creator>cuan</dc:creator>
      <dc:date>2021-02-11T16:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a dataset with periods of treatment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718665#M222444</link>
      <description>Dear Reza, I am Sorry, maybe you didn't understand my explanation, &lt;BR /&gt;There are a logic in my dataset WANT, and &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt; code solved that problem.</description>
      <pubDate>Thu, 11 Feb 2021 16:50:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-dataset-with-periods-of-treatment/m-p/718665#M222444</guid>
      <dc:creator>cuan</dc:creator>
      <dc:date>2021-02-11T16:50:37Z</dc:date>
    </item>
  </channel>
</rss>

