For the month you should use a subquery for get all the month you need:
select monthname(my_date), ifnull(count, 0)
from (
select str_to_date('2018-01-01', '%Y-%m-%d') as my_date
union
select str_to_date('2018-10-01', '%Y-%m-%d')
union
select str_to_date('2018-11-01', '%Y-%m-%d')
union
select str_to_date('2018-12-01', '%Y-%m-%d')
) t
left join (
SELECT
count(v.visit_id) as count,
MONTHNAME(v.updated) AS Month_name,
MONTH(v.updated) as my_month
FROM patient_status as p
INNER JOIN visit_history_details as v
ON v.visit_id = p.visit_id
WHERE v.hospital_code = 'id'
and p.doctor_id = '2'
and v.updated >= now()-interval 3 month
GROUP by Month_name
) r on r.my_month = t.my_month
And you should avoid old implicit join syntax and use the explicit syntax.
Or as suggested by Salman A for a more general solution:
select monthname(my_date), ifnull(count, 0)
from (
select LAST_DAY(CURRENT_TIMESTAMP) + INTERVAL 1 DAY - INTERVAL 1 MONTH as my_date
union
select LAST_DAY(CURRENT_TIMESTAMP) + INTERVAL 1 DAY - INTERVAL 2 MONTH
union
select LAST_DAY(CURRENT_TIMESTAMP) + INTERVAL 1 DAY - INTERVAL 3 MONTH
union
select LAST_DAY(CURRENT_TIMESTAMP) + INTERVAL 1 DAY - INTERVAL 4 MONTH
) t
left join (
SELECT
count(v.visit_id) as count,
MONTHNAME(v.updated) AS Month_name,
MONTH(v.updated) as my_month
FROM patient_status as p
INNER JOIN visit_history_details as v
ON v.visit_id = p.visit_id
WHERE v.hospital_code = 'id'
and p.doctor_id = '2'
and v.updated >= now()-interval 3 month
WHERE v.visit_id = p.visit_id and v.hospital_code = 'id'
and p.doctor_id = '2' and v.updated >= now()-interval 3 month
GROUP by Month_name