<?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: Mult. Test Results for Same Patient Need to Be Put into Single Observat in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61294#M1488</link>
    <description>Thank you!&lt;BR /&gt;
&lt;BR /&gt;
I need to create a new variable for each patient that presents the percent change from the max. hematocrit level to the min. hematocrit level.</description>
    <pubDate>Fri, 06 Aug 2010 18:40:07 GMT</pubDate>
    <dc:creator>KeithAtchison</dc:creator>
    <dc:date>2010-08-06T18:40:07Z</dc:date>
    <item>
      <title>Mult. Test Results for Same Patient Need to Be Put into Single Observation</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61292#M1486</link>
      <description>Hello from Brazil!&lt;BR /&gt;
&lt;BR /&gt;
I am working with a dengue database. Each dengue patient's hematocrit levels are measured multiple times to differentiate between dengue fever and dengue hemorrhagic fever. Consequentially, I have a database that looks like this.&lt;BR /&gt;
&lt;BR /&gt;
Result_ID     Patient_ID   Hematocrit% ...( various other tests)... Date&lt;BR /&gt;
67                 123              45                                                 07/06/2009&lt;BR /&gt;
68                 123              37                                                 07/07/2009&lt;BR /&gt;
69                 102              50                                                 08/07/2009&lt;BR /&gt;
70                 102              51                                                 08/08/2009&lt;BR /&gt;
71                 102              33                                                 08/09/2009&lt;BR /&gt;
&lt;BR /&gt;
I need to get all hematocrit tests for a given patient_id into a single observation, so that it looks like this.&lt;BR /&gt;
&lt;BR /&gt;
Patient_ID    Hematocrit1      Hematocrit2     Hematocrit3    Hematocrit4&lt;BR /&gt;
123                    45                     37                 &lt;BR /&gt;
102                    50                     51                 33&lt;BR /&gt;
&lt;BR /&gt;
The test results do not have to be ordered chonologically (i.e. Hematocrit 1=earliest,Hematocrit 7=latest) but it would be nice. The number of hematorcrit tests for patients ranges from 0 to 7. I do not need any other tests in the new dataset.&lt;BR /&gt;
&lt;BR /&gt;
I have been racking my brain over this and can't figure it out. Any help/tips would be super appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Beijos&lt;BR /&gt;
Keith</description>
      <pubDate>Fri, 06 Aug 2010 17:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61292#M1486</guid>
      <dc:creator>KeithAtchison</dc:creator>
      <dc:date>2010-08-06T17:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Mult. Test Results for Same Patient Need to Be Put into Single Observation</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61293#M1487</link>
      <description>Why do the results need to be all in one observation?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=XXX;&lt;BR /&gt;
  by Patient_Id date;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc transpose data=XXXX;&lt;BR /&gt;
  by Patient_ID;&lt;BR /&gt;
  var hematocrit_pct;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 06 Aug 2010 18:31:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61293#M1487</guid>
      <dc:creator>MZunnurain</dc:creator>
      <dc:date>2010-08-06T18:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Mult. Test Results for Same Patient Need to Be Put into Single Observat</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61294#M1488</link>
      <description>Thank you!&lt;BR /&gt;
&lt;BR /&gt;
I need to create a new variable for each patient that presents the percent change from the max. hematocrit level to the min. hematocrit level.</description>
      <pubDate>Fri, 06 Aug 2010 18:40:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61294#M1488</guid>
      <dc:creator>KeithAtchison</dc:creator>
      <dc:date>2010-08-06T18:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Mult. Test Results for Same Patient Need to Be Put into Single Observat</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61295#M1489</link>
      <description>You didn't answer my other question....&lt;BR /&gt;
&lt;BR /&gt;
Next, tell me how you would find the max.</description>
      <pubDate>Fri, 06 Aug 2010 19:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61295#M1489</guid>
      <dc:creator>MZunnurain</dc:creator>
      <dc:date>2010-08-06T19:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Mult. Test Results for Same Patient Need to Be Put into Single Observation</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61296#M1490</link>
      <description>This really comes down to a question of which tools you are comfortable with.  As the goal is to reduce the data to one number per person (MaxDeltaHctPct), it can be done with the data strung out like Keith wants and computed using the MAX and MIN functions in the DATA step.  &lt;BR /&gt;
&lt;BR /&gt;
It could also be done directly on the original data using the MAX and MIN aggregate functions in SQL (which are somewhat different from the DATA step functions), but that requires a bit more knowledge of SQL than some people might have at their fingertips.  &lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Mon, 09 Aug 2010 18:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Mult-Test-Results-for-Same-Patient-Need-to-Be-Put-into-Single/m-p/61296#M1490</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-08-09T18:48:57Z</dc:date>
    </item>
  </channel>
</rss>

