Recent research suggests that rapid recovery after knee replacement is beneficial for all patients. Rapid recovery requires timely attention after surgery, yet staff resources are usually limited. Thus, patients with the highest possible health gains from rapid recovery should be identified with the objective to prioritise these patients when assigning rapid recovery capaci ties. We analyze the effect of optimal assignment rules under different capacity constraints for patients set on the rapid recovery care path using disease specific patient-reported outcomes (KOOS-PS) as measure for effectiveness. Subsequently, we build a policy tree to develop optimal treatment assignment rules. We use patient-reported and observational data from nine German hospitals from 2020/21. We apply a causal forest to estimate the double-robust treatment effects, controlling for patient characteristics. We confirm that on average, after controlling for patient characteristics, patients on the rapid recovery care path experience a significantly larger improvement of their joint functionality than patients on the conventional care path. Using the policy tree, we find that health outcome improvement can be increased on average from 17.87 (observed improvement) to 20.02 on the KOOS-PS scale (0 − 100) with out increasing capacity using optimal assignment rules selecting patients for rapid recovery with characteristics linked to higher health gains. Increasing the capacity expects an health outcome improvement of 20.13. We conclude that novel machine learning methods are effec tive in developing rules for selecting patients for rapid recovery based on their characteristics maximising overall health gains given limited resources. Ultimately, such algorithms should be used for clinical decision making systems as well as surgery and post-surgery capacity planning to work towards the pressing challenges of increasing demand and decreasing supply, driven by demographic change, in today’s hospital sector.