Templating strategies specify policies on capacity allocation and appointment booking, which are central to patient access management in outpatient specialty practices (SPs). In the widely-implemented partitioned templating strategy, appointment capacity is allocated exclusively to each patient group defined by a combination of patient attributes and medical conditions, which often results in utilization challenges for SPs. Motivated by problems faced by an SP within a large academic medical center, we propose partially-partitioned templating strategies that cluster patient groups into access classes and allocate appointment slots to these classes. We formulate a two-stage stochastic optimization model to simultaneously optimize decisions on patient group clustering and capacity allocation in the templating strategy design. We develop an efficient solution algorithm for the problem, which otherwise poses a combinatorial challenge, based on Benders' cuts and an anticipatory approximation. Numerical experiments using real-world data show that the partially-partitioned strategies outperform benchmark strategies used by SPs through maintaining a balance of high capacity utilization and providing timely access for priority patients. Partially-partitioned templates can be readily implemented using the existing functionality of common electronic appointment management systems. Therefore, we advise SP leadership to adopt partially-partitioned templating strategies to improve their patient access management.