Moving dental and collection code to preprocess function.