How can I calculate the sample size of self-control study design for a two-arm meta-analysis I recently encounter with a question is that I want to perform a traditional two-arm meta-analysis, however, some of the included studies are self-controlled study design.
The natural way to deal this is to set the sample size of the intervention arm and control arm as the patient number.
However, it seems to me that the self-control design and the traditional randomized controlled trial are different.
How could I deal with this problem, thanks a lot!

It depends on what you mean by "self-controlled design".
If you mean a randomized cross-over study, then such a study can nicely be combined with parallel group randomized trials by using the estimate of the treatment effect and the standard error (SE) for it as estimated in the publication by the authors using the individual patient data (assuming they used an appropriate analysis for a cross-over study). The generic inverse variance approach that uses estimates of treatment effects and SEs as an input is described e.g. in Section 10.3 of the Cochrane Handbook. However, this will not so easily fit into a paradigm that expects mean and SE by group, because the outcomes by group are correlated. That's because each patient received multiple treatments and hence the outcomes of the groups are correlated, because results for the same patient are not independent (which carries through to the group means). This makes them a bit harder to integrate into network meta-analyses, but it sounds like the estimate & SE approach could work in your simpler case.
If you mean a before-and-after design (i.e. looking at patients before an intervention and then, again, after an intervention and seeing how much things changed), these studies are much harder to use, because  the commonly done before-and-after comparisons are essentially invalid/useless/pointless/misleading (pick your favorite term) for assessing whether the intervention had a causal effect. That's because of things like regression to the mean that usually mean that you see a substantial improvement even with completely ineffective interventions. Most people would probably use well-performed observational studies before relying on evidence like that. Versions of such uncontrolled studies that try to account to the amount of improvement you might see without intervention are more appropriate. For example, trials that use solely external controls (i.e. compare to what you expect in similar patients from some other data source) are an already quite an improvement on that simple before and after comparison, but that's of course still not a randomized comparison as you have a randomized parallel group trial or a randomized cross-over trial. Even better approaches exist that try to have some concurrent randomized controls, or try to take measures to make external controls better matched to the trial population.
