Hamas' casualty numbers came from hospitals and morgues only in the first few months of war; that hasn't been the case for a long time. This isn't controversial - Hamas has been fairly open about incorporating "reliable media sources".
I think only Hamas knows the breakdown for their latest numbers, but earlier they used to acknowledge how many casualty reports were based on online form submissions. For example you can see some old data in Figure 11b here: https://www.washingtoninstitute.org/sites/default/files/pdf/...