public function getOutstandingSignatures()
    {
        $signatures = array();
        $sql = <<<EOT
\t\tSELECT DISTINCT CMNDate, PatientID FROM AT_Admission AS A
\t\t  WHERE ProviderID = :providerID AND PhyRefusesToSign = 'False' AND DoctorSig = 'False' AND CompTicket = 'False' AND PlanCode <> 'Self'
\t\t  AND ID IN (SELECT AdmissionID FROM AT_Orders WHERE AdmissionID = A.ID AND Status = 'Shipped')
EOT;
        $signatureQuery = $this->dbh->prepare($sql);
        $signatureQuery->execute(array('providerID' => $this->providerID));
        while ($row = $signatureQuery->fetch(\PDO::FETCH_ASSOC)) {
            $IDs = getAdmissionIDs($row['PatientID'], $row['CMNDate']);
            $signatures[] = new \OnlineOrders\Admission($IDs[0]['ID']);
        }
        return $signatures;
    }
                        echo json_encode(array('Message' => 'There was an error: ' . $e->getMessage()));
                    }
                } else {
                    throw new \Exception('notAdminFail');
                }
            }
        });
        /**
         *
         * @AJAX Action - Signs selected orders if physician is signed in
         *
         **/
        $app->post('/signOrders/', function () use($app) {
            $user = getCurrentUser();
            $admissions = $_POST['admissions'];
            $NPI = $_POST['NPI'];
            $provider = new \OnlineOrders\Provider($NPI);
            $results = array('NPI' => $NPI, 'userID' => $user->get('userID'), 'admissions' => array());
            foreach ($admissions as $key => $value) {
                foreach (getAdmissionIDs($value['pid'], $value['cmnDate']) as $admission) {
                    $temp = new \OnlineOrders\Admission($admission['ID']);
                    $results['admissions'][] = $temp;
                    if ($user->get('userID') !== 'test@test.org') {
                        $temp->eSign($NPI, $user->get('userID'));
                    }
                }
            }
            echo json_encode($results);
        });
    });
});