# Patient Portal whereto variable

**URL:** <https://community.open-emr.org/t/patient-portal-whereto-variable/24518>\
**Category:** OpenEMR Development\
**Tags:** question, infrastructure, feature\
**Created:** [February 20, 2025, 7:20pm UTC](https://community.open-emr.org/t/patient-portal-whereto-variable/24518 "2025-02-20T19:20:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [February 20, 2025, 7:20pm UTC](https://community.open-emr.org/t/patient-portal-whereto-variable/24518/1 "2025-02-20T19:20:42Z")

</div>

Hi @sjpadgett,

How can this variable

```
     $whereto = $_SESSION['whereto'] ?? null; Line 53 home.php

```

be set on a redirect from the OT login?

This does not work

```
  $protocol . $domain .$GLOBALS['webroot']. '/portal/home.php?site=default&whereto=paymentcard';

```

Can I use this?

```
  $whereto = $_SESSION['whereto'] ?? $_GET['whereto'] ?? null;

```

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [February 20, 2025, 9:02pm UTC](https://community.open-emr.org/t/patient-portal-whereto-variable/24518/2 "2025-02-20T21:02:52Z")

</div>

> [@juggernautsei](#):
>
> `paymentcard`

Are you using my onetime class or event?  
You can’t use whereto from url unless you modify home to apply the redirect to a href on page.

---

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [February 20, 2025, 9:53pm UTC](https://community.open-emr.org/t/patient-portal-whereto-variable/24518/3 "2025-02-20T21:53:21Z")

</div>

I am access the portal from the one time redirect. I am asking if I include the where to in the URL and modify the home variable to this:

```
 $whereto = $_SESSION['whereto'] ?? $_GET['whereto'] ?? null;

```

Will this get me to the payment page?

---

<div class="post-metadata">

**Author:** ![sjpadgett](https://community.open-emr.org/user_avatar/community.open-emr.org/sjpadgett/32/21623_2.png) [@sjpadgett](https://community.open-emr.org/u/sjpadgett)\
**Post date:** [February 20, 2025, 10:01pm UTC](https://community.open-emr.org/t/patient-portal-whereto-variable/24518/4 "2025-02-20T22:01:26Z")

</div>

Yes but where are you generating the onetime token?

---

<div class="post-metadata">

**Author:** ![juggernautsei](https://community.open-emr.org/user_avatar/community.open-emr.org/juggernautsei/32/10764_2.png) [@juggernautsei](https://community.open-emr.org/u/juggernautsei)\
**Post date:** [February 21, 2025, 11:09am UTC](https://community.open-emr.org/t/patient-portal-whereto-variable/24518/5 "2025-02-21T11:09:21Z")

</div>

I am generating the token in the patient check-in module.

> [@Patient Check-In module](https://community.open-emr.org/t/patient-check-in-module/24489/1):
>
> Here is a video on how it works. Post any questions or suggestions. The module is for sell. Contact me for pricing. This module will work in the upcoming version v7.0.3. [[Patient check in module for OpenEMR] ](https://www.youtube.com/watch?v=llgmI8H0HUg) UPDATE: The module is now better. The process of taking the patient’s insurance card is completed. Now the insurance card shows in the patient’s chart here.
