use Pivoting node where grouping column will be Patient, pivoting column will be Gene and for aggregation column you need to use dummy column with value 1 (you can add it with Constant Value Column node) with aggregation First for example.
Where there’s no gene for a patient you’ll get missing values. To replace those with zero use Missing Value node.