Import from PDF into forms

noscrodamus wrote on Tuesday, May 24, 2016:

Attempting to send data from PDF using POST to save.php file.
Manually setting the SESSION ID and PID, but still receiving “Site ID is missing from session data!” error upon submission.
I have hidden the values for SESSION site_id and pid on the pdf and pass those values to save.php.

This is at the top of save.php:

print_r($_SESSION);
print_r($_POST);
$_SESSION['site_id']=$_POST['site_id'];
$_SESSION['pid']=$_POST['pid'];

What am I missing?

mdsupport wrote on Tuesday, May 24, 2016:

Search this forum for “Site ID is missing”.

One of the hits will be this thread.

noscrodamus wrote on Wednesday, May 25, 2016:

Thank you for the link.
The majority of ‘Site ID missing’ cases were install related, I am trying to add functionality.

The forms are downloaded from the Native Patient portal and currently have these values in the SESSION array:

Array ( [site_id] => default [language_choice] => 1 [language_direction] => ltr [portal_username] => EHAB4 [pid] => 3 [patient_portal_onsite] => 1 ) 

are these enough? I would consider dev. consulting if the issue proves too troublesome.

teryhill wrote on Wednesday, May 25, 2016:

Are you including verify. php? Look at some of the other code like for the documents in the portal. I am away from my computer and may have an incomplete file name. The session information is set in that program.

Terry

Sent from my iPhone

On May 24, 2016, at 10:35 PM, Noscrodamus noscrodamus@users.sf.net wrote:

Thank you for the link.
The majority of ‘Site ID missing’ cases were install related, I am trying to add functionality.

The forms are downloaded from the Native Patient portal and currently have these values in the SESSION array:

Array ( [site_id] => default [language_choice] => 1 [language_direction] => ltr [portal_username] => EHAB4 [pid] => 3 [patient_portal_onsite] => 1 ) 

are these enough? I would consider dev. consulting if the issue proves too troublesome.


Import from PDF into forms


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openemr/discussion/202506/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

noscrodamus wrote on Wednesday, May 25, 2016:

I have tried with and without verify_session.php.
It takes me back to the $landingpage
Here is the top of save.php

require_once('../../globals.php');
print_r($_SESSION);
print_r($_POST);
$_SESSION['site_id']=$_POST['site_id'];
$_GET['site_id']=$_POST['site_id'];
$_SESSION['pid']=$_POST['pid'];
require_once($GLOBALS['srcdir'].'/api.inc');
require_once("/var/www/html/openemr/patients/verify_session.php");
/* for ??? */
require_once($GLOBALS['srcdir'].'/forms.inc');
/* for formDataCore() */
require_once($GLOBALS['srcdir'].'/formdata.inc.php');

Are there any logs I can look at to see why this isnt working?

noscrodamus wrote on Wednesday, May 25, 2016:

I am checking the interaction between view.php and save.php. It does not seem like any session data is being passed to save.php. Is this correct?

visolveemr wrote on Thursday, May 26, 2016:

Session data will be passed from the globals.php.

Try adding the following lines at the top of the save.php, just above “require_once(’…/…/globals.php’);” this line.

$fake_register_globals=false;
$sanitize_all_escapes=true;
$ignoreAuth=true;

In case you face further issues, let us know the exact scenarios and the file locations.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc

noscrodamus wrote on Thursday, May 26, 2016:

I feel silly, I set everything back to defaults and new.php and view.php are indeed sending SESSION and GET data to save.php.

Using your soution, I get an invalid server response on adobe acrobat pro. I am sending the data as POST and it is capable of connecting to the server and returning output. I have tested using a print_r($POST); script

Any idea of how to get around this? Also, what data is absolutely necessary to be passed to the server to make this work? Thank you!