When copying an Obs, any order associated with that Obs is not copied over. This seems incorrect to me, particularly because since Obs are immutable, whenever an Obs is modified it is “copied”, resulting in the loss of any linkage to an Order.
However, there is one unit test that expects this behavior:
Do we need to special case this? It seems like this test is assuring that when an Encounter is transferred from one patient to another, we don’t copy over any Orders associated with that Encounter, which seems fine to me. But do we really need to make sure any Obs on that Encounter that were linked to an order no longer are? I assume the point of this ticket was to make sure that Orders aren’t inadvertently transferred from one patient to another. But the “Order” on an Obs refers to the the Order that resulted in this Obs (as I understand it). I don’t think we want to lose this information?
Take care, Mark