This paper studies the optimal configuration of hospital inpatient rooms with private rooms and semiprivate rooms and capacity allocation within multiple types of patients. Different types of patients have different waiting time targets. It is important to configure and allocate the limit resources to multiple patient types and manage patient access for maximizing hospital revenue and patients equity for public hospitals. Considering about the uncertainties of patients arrival and service time, we propose a stochastic programming (SP) model for inpatient rooms configuration and allocation with the objective of revenue maximization under the constraints of maintaining equity among multiple patient types. Two dimensions of equity are considered: equity of access and responsiveness equity. To solve the model, we transform the SP model with chance constraints to a deterministic programming model by reformulating the chance constraints to knapsack constraints. Based on a linearization approach and a simulation model, the complex SP model is transformed to a deterministic linear programming model, which is solved by CPLEX. Numerical results show that the expected total revenue increases when the equity requirement level decreases, or when the total room capacity increase.