Can the appointment details/confirmation popup show whether or not the patient has access to the patient portal? If they do not have access, then provide the ability to invite them in the same screen.