If you are approved for Social Security benefits, you will also receive medical benefits. If you receive SSDI benefits, then you will received Medicare. However, there is a 24 month waiting period for Medicare. The waiting period starts with the first month you are eligible for payment of benefits. The clock starts running from that first payment month, even if you are not approved until a later time period. If you are not approved until after your ALJ hearing, then the waiting period may have already passed and you would be immediately eligible for Medicare.
Supplemental Security Income benefits allow you to have Medicaid benefits. Unlike Medicare, there is no waiting period for Medicaid. If you are receiving SSDI and your household income is low enough, you will receive both Medicaid and Medicare.
Child who get disability benefits also receive Medicaid benefits and there is no waiting period. Many child who are approved for SSI are already receiving Medicaid.