Updated cascade option on stock operation to cascade removed and orphaned transactions.
Updated the distribution test to load the core dataset and use a valid patient.