Learning Optimal Dynamic Treatment Regimes Using Causal Tree Methods in Medicine