public static function buildJSJumpLink($objectId, $signingUserId, $objectClass)
    {
        $objectClass = 'Medications';
        // temporarily hard code objectClass based on MainController::getMainTabs() definitions
        $medication = new Medication();
        $medication->medicationId = $objectId;
        $medication->populate();
        $patientId = $medication->personId;
        $js = parent::buildJSJumpLink($objectId, $patientId, $objectClass);
        $js .= <<<EOL

mainTabbar.setOnTabContentLoaded(function(tabId){
\tloadMedication(objectId);
\topenNewMedicationWindow(objectId);
});

EOL;
        return $js;
    }
 public function preDispatch()
 {
     parent::preDispatch();
     $this->view->addPharmacy = false;
 }
 public function init()
 {
     parent::init();
     $this->_customKey = 'custom';
     $this->_customName = __('Custom');
 }
 public static function buildJSJumpLink($objectId, $signingUserId, $objectClass)
 {
     $objectClass = 'Provider';
     // temporarily hard code objectClass based on MainController::getMainTabs() definitions
     //trigger_error("pip" . $objectId, E_USER_NOTICE);
     $js = parent::buildJSJumpLink($objectId, $objectId, $objectClass);
     return $js;
 }
    public static function buildJSJumpLink($objectId, $signingUserId, $objectClass)
    {
        $objectClass = 'Labs';
        // temporarily hard code objectClass based on MainController::getMainTabs() definitions
        $labOrder = new LabOrder();
        $labOrder->labOrderId = $objectId;
        $labOrder->populate();
        $patientId = $labOrder->patientId;
        $js = parent::buildJSJumpLink($objectId, $patientId, $objectClass);
        $js .= <<<EOL

mainTabbar.setOnTabContentLoaded(function(tabId){
\tTabState.setParam({"orderId":objectId});
\treloadLabResultsGrid();
});

EOL;
        return $js;
    }
    public static function buildJSJumpLink($objectId, $signingUserId, $objectClass)
    {
        $objectClass = 'Notes';
        // temporarily hard code objectClass based on MainController::getMainTabs() definitions
        $clinicalNote = new ClinicalNote();
        $clinicalNote->clinicalNoteId = $objectId;
        $clinicalNote->populate();
        $patientId = $clinicalNote->personId;
        $js = parent::buildJSJumpLink($objectId, $patientId, $objectClass);
        $js .= <<<EOL

mainTabbar.setOnTabContentLoaded(function(tabId){
\tTabState.setParam({'filter':'byLast100','personId':patientId});
\tTabState.redrawTab(objectId);
\tloadTemplatePane(objectId);
});

EOL;
        return $js;
    }