Example #1
0
 /**
  * Get the boilerplate details for the requested row
  * @param type $sTrackingID
  */
 function getDashboardDetails()
 {
     $sThisResultName = 'getDashboardDetails';
     $aCachedResult = $this->m_oRuntimeResultCache->checkCache($sThisResultName);
     if ($aCachedResult !== null) {
         //Found it in the cache!
         return $aCachedResult;
     }
     $wl = new WorklistData($this->m_oContext);
     $aResult = $wl->getDashboardMap();
     $this->m_oRuntimeResultCache->addToCache($sThisResultName, $aResult);
     return $aResult;
 }
Example #2
0
 function __construct($oContext)
 {
     $this->m_aResultCache = array();
     $this->m_oContext = $oContext;
     $this->m_oRuntimeResultCache = \raptor\RuntimeResultCache::getInstance($this->m_oContext, 'ProtocolSupportingData');
     $wl = new WorklistData($this->m_oContext);
     $this->m_aDashboardMap = $wl->getDashboardMap();
     // getWorklistForProtocolSupport();
     $this->m_aPatientInfo = $wl->getPatient($this->m_aDashboardMap["PatientID"]);
     if ($this->m_aPatientInfo == NULL) {
         $msg = 'Did NOT get patient data in constructor of ProtocolSupport for context=' . $oContext . '<br>orders=' . print_r($this->m_aDashboardMap, TRUE) . '<br>Stack trace...<br>' . Context::debugGetCallerInfo(5);
         error_log($msg);
         throw new \Exception($msg);
     }
 }
Example #3
0
 public function getDashboardMap($override_tracking_id = NULL)
 {
     if ($override_tracking_id !== NULL) {
         //TODO -- Change this side-effect so override does NOT alter the context for the session!!!!
         $this->m_oContext->setSelectedTrackingID($override_tracking_id);
     }
     $aResult = $this->getWorklistRows();
     $offset = $aResult['matching_offset'];
     $all_rows = $aResult['DataRows'];
     $row = $all_rows[$offset];
     $currentTrackingID = $this->m_oContext->getSelectedTrackingID();
     if (!isset($row[WorklistData::WLIDX_TRACKINGID])) {
         throw new \Exception('Expected to get dashboard for trackingID=[' . $currentTrackingID . '] but did not!');
     }
     if ($currentTrackingID != $row[WorklistData::WLIDX_TRACKINGID]) {
         throw new \Exception('Expected to get dashboard for trackingID=[' . $currentTrackingID . '] but got data for [' . $row[WorklistData::WLIDX_TRACKINGID] . '] instead!');
     }
     $siteid = $this->m_oContext->getSiteID();
     $tid = $row[WorklistData::WLIDX_TRACKINGID];
     $pid = $row[WorklistData::WLIDX_PATIENTID];
     $oPatientData = $this->getPatient($pid);
     if ($oPatientData == NULL) {
         throw new \Exception('Did not get patient data for trackingID=[' . $currentTrackingID . ']');
     }
     // use DDR GETS ENTRY to fetch CLINICAL Hx WP field
     $worklistItemDict = $this->getWorklistItemFromMDWS($tid);
     $t['Tracking ID'] = $siteid . '-' . $tid;
     $t['Procedure'] = $row[WorklistData::WLIDX_STUDY];
     $t['Modality'] = $row[WorklistData::WLIDX_MODALITY];
     $t['ExamCategory'] = $row[WorklistData::WLIDX_PATIENTCATEGORYLOCATION];
     $t['PatientLocation'] = $row[WorklistData::WLIDX_EXAMLOCATION];
     $t['RequestedBy'] = $row[WorklistData::WLIDX_REQUESTINGPHYSICIAN];
     $aSchedInfo = $row[WorklistData::WLIDX_SCHEDINFO];
     $t['SchedInfo'] = $aSchedInfo;
     $t['RequestedDate'] = $row[WorklistData::WLIDX_DATEORDERED];
     $t['DesiredDate'] = $row[WorklistData::WLIDX_DATETIMEDESIRED];
     $t['ScheduledDate'] = $aSchedInfo['EventDT'];
     $t['PatientCategory'] = $row[WorklistData::WLIDX_PATIENTCATEGORYLOCATION];
     $t['ReasonForStudy'] = $row[WorklistData::WLIDX_REASONFORSTUDY];
     $t['ClinicalHistory'] = trim(isset($worklistItemDict["400"]) ? $worklistItemDict["400"] : '');
     $t['PatientID'] = $pid;
     $t['PatientSSN'] = WorklistData::formatSSN($oPatientData['ssn']);
     $t['Urgency'] = $row[WorklistData::WLIDX_URGENCY];
     $t['Transport'] = $row[WorklistData::WLIDX_TRANSPORT];
     $t['PatientName'] = $row[WorklistData::WLIDX_PATIENTNAME];
     $t['PatientAge'] = $oPatientData['age'];
     $t['PatientDOB'] = $oPatientData['dob'];
     $t['PatientEthnicity'] = $oPatientData['ethnicity'];
     $t['PatientGender'] = $oPatientData['gender'];
     $t['ImageType'] = $row[WorklistData::WLIDX_IMAGETYPE];
     $t['mpiPid'] = $oPatientData['mpiPid'];
     $t['mpiChecksum'] = $oPatientData['mpiChecksum'];
     $t['CountPendingOrders'] = $row[WorklistData::WLIDX_COUNTPENDINGORDERSSAMEPATIENT];
     $t['MapPendingOrders'] = $row[WorklistData::WLIDX_MAPPENDINGORDERSSAMEPATIENT];
     return $t;
 }