Let’s say there’s a new medication that could make you live longer, feel more positive, and improve your overall quality of life.

It’s an elixir that doesn’t have side effects. It’s effective. And it doesn’t cost a penny.

It’s out there. Really.

It goes by many names — healthy living, wellness, prevention. Its components are happiness and health — because the two are intertwined and have a direct effect on each other.

Here are some scientific data to back that up: People who are happier and enjoy greater satisfaction with life report feeling 50 percent healthier, and their good health lasts. They are less likely to report poor health two years later.

So where can you sign up?

First things first. You can’t control all of your happiness — because your genes determine about half of it. 

And major events, such as a new baby, a new spouse or a new home, influence about 10 percent of your happiness.

The good news is, this leaves about 40 percent of your well-being that you are able to influence — by your thoughts and actions.

Ok, so that’s easy enough. Right? Just go out buy a new car or get a new, better-paying job. Maybe win the lottery. Instant health and happiness.

Not so fast. Those things can bring a smile to your face, but usually only for a short while. They aren’t usually the keys to lasting happiness and health.

Despite what many people think, money doesn’t “buy happiness.” Money can make a huge difference to people who are poor. When your basic life needs are met, money alone doesn’t boost happiness by very much.

How you spend your money is the key to lasting happiness. If you spend it going out with friends, traveling or on other experiences for you and those around you, it will bring more lasting joy than if you spend money on material items. According to one study, regular vacations can lower cardiovascular risk by 30 percent. Even small vacations can make a difference, so it needn’t be a huge investment.

You can also increase happiness — and by extension, your health ­— by doing small things for yourself throughout the day.

Here are some scientifically proven mood-enhancers.

  • Savor simple, fun activities such as spending time outdoors, eating your favorite foods, and relaxing to music.
  • Look for humor in your life — and feel the healing power of laughter.
  • Practice gratitude by writing lists of things for which you are thankful, things you take for granted, and people who mean a great deal to you. Studies have shown that doing this for two weeks leads to measurable improvement in life satisfaction.
  • Write notes to people you are grateful for knowing and be as specific as possible in your praise — the details make a big difference in elevating your mood, and theirs.
  • Indulge your senses. Studies show looking at nature, taking short naps, and receiving a massage can have positive effects on your health.
  • Focus on something else or a living creature besides yourself. When you connect with faith or philosophy, for example, or care for plants or pets — you actually improve your health and survival.
  • Watch what you tell yourself. Evidence suggests that optimistic people are happier, live longer, and enjoy life more. If you are not inclined to have a rosy outlook, you can train yourself to focus on the positive.

So here’s my prescription for you: Go on a vacation, take a siesta, watch a funny movie and write thank-you notes. You might be surprised with what happens.