Hello, this seems like a stupid question but I am not a full time statistician

Anyway I have 5 measurements (baseline, 2, 6, 12 and 24h) of analgesic requirements which I ordered 0-none, 1-NSAID and 2-opioid. And would like to test for difference between groups of patients.

I know that Friedman test is intended for ordinal data RM but it is not possible to test between groups (at least in jamovi, jasp, past and blue sky statistics

I would like to know if I can treat that data as categorical variables (since I have them labeled that way) and just perform chi squared for each measurement.

Thank you