...
Eventually, we will get to a world where multiple people may be simultaneously writing orders and/or saving orders in a draft or pending state for a while, meaning that we could have something similar to branching; however, since orders only get an order number when activated (i.e., "committed") and we will have to perform conflict resolution on cases where conflicting orders have been activated (effectively re-basing the orders to continue the git analogy), I think it's okay to treat our linked list (previous order number) as a linear. For example, if the patient has been prescribed penicillin with order 123 and you start to discontinue it (i.e., you are about to activate a "discontinue penicillin" order that would become order number 124 with a "previous order number" of 123), but I sneak in and change the dose of pencillin before you sign your orders, my order with a new dose of penicillin would get order number 124 + previous order number 123 and you would be forced to review the change before you completed your orders. Most importantly, if you decide to still discontinue penicillin despite my change to it, your "discontinue penicillin" order would become order number 125 with a previous order number 124 (i.e., linked to my change, not the original order number 123).
Class diagram