I have similar to this table with many columns and thousand of rows (patients)
- as you can see each patient have 6 tests(test1 to test6) with different 6 result.
- all other columns have the same result.
- I need to switch the results from vertical to horizontal so I the table can show one record for each patient. like table2
Table 1:
Before:
<tbody>
</tbody>
Table 2
After:
<tbody>
</tbody>
- as you can see each patient have 6 tests(test1 to test6) with different 6 result.
- all other columns have the same result.
- I need to switch the results from vertical to horizontal so I the table can show one record for each patient. like table2
Table 1:
Before:
FILE NO | RCVD DATE | COUNTRY | ID_NO | PID_NO | TEST | RESULT | REPORT DATE |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | TEST1 | NOT TESTED | 5/25/2018 |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | TEST2 | NOT TESED | 5/25/2018 |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | TEST3 | POSITIVE | 5/25/2018 |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | FINAL RESULT | POSTTIVE | 5/25/2018 |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | TEST4 | NOT TESTED | 5/25/2018 |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | TEST5 | NOT TESTED | 5/25/2018 |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | TEST6 | PENDING | 5/25/2018 |
<tbody>
</tbody>
Table 2
After:
FILE NO | RCVD DATE | COUNTRY | ID_NO | PID_NO | TEST1 | TEST2 | TEST3 | TEST4 | TEST5 | TEST6 | FINAL RESULT | REPORT DATE |
1 | 5/1/2018 | USA | 1234567890 | ABCDEFGH | NOT TESTED | NOT TESTED | POSITIVE | NOT TESTED | NOT TESTED | PENDING | POSITIVE | 5/25/2018 |
<tbody>
</tbody>