random patient generator related updates and layout editor fix (#4713)