Accounting for domain-shift in image dataset

I’m training a CNN model on medical images. Training set consists of images that are available in open source. However, the model would be deployed in a completely different setting, thus the problem of domain shift would arise and the model would most likely perform poorly on real world data. How should I generalize the model? I think that maybe I can look at the image pixel distribution of my training dataset and figure out some parameters like mean, standard deviation which when applied to the real world data would result in a similar image like the training set. But then how should I carry out this task? Kindly help.

A model will be effective only if the production time data distribution is covered at train time. Consider taking Deep Learning Specialization which covers model analysis in detail.