A colleague is getting some hospitalized patients' length of stay (LOS) and costs from each hosptal in a strange format. Below is a fictional example: There's the hospital's ID, followed by the three patients with the longest LOS, and some lines with various total costs for the patients at that hospital. STM PTID LOS Vstay Zstay 204 George 8.81 . 3.89 996 Mary 6.62 2 8.32 920 Bill 1.12 3.16 . IndCost $38,989.00 K Pharm $5,602 D TotCost $101,602.00 K UMD PTID LOS Vstay Zstay 728 Phil 10.96 4.2 56.3 299 Sue 7.77 . 6.11 5 John 6.01 3.2 . IndCost $11,999.00 H TotCost $300,101.44 D MV $555.98 T Pharm $408.62 K VasoDil $5,602 D Much of the information is extraneous to the study. What I'd like to obtain is three lines for each hospital. The first line has the hospital ID, followed by the first PTID and his/her LOS. The second line has the hospital ID, followed by the second PTID with the amount for IndCost. The third line has the hospital ID, followed by the third PTID with the amount for IndCost. STM 204 8.81 STM 996 $38,989.00 STM 920 $101,602.00 UMD 728 10.96 UMD 299 $11,999.00 UMD 5 $300,101.44 I can't figure out how to input data that is this weird, so I'm hoping one of you can help. Thanks!!!! Andrew
... View more