Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- commit 3c9c7540a45d206abb167d9066d64ed37fcdad77
- Author: Corey Losenegger <losenegger@earthlinginteractive.com>
- Date: Wed Aug 23 15:00:28 2017 -0500
- CXALIGN-53 Get report 1008 working with checkpoints
- diff --git a/src/main/php/Align/EP/PdfHtmlDocument.php b/src/main/php/Align/EP/PdfHtmlDocument.php
- index 8d0e006c..52fa2567 100644
- --- a/src/main/php/Align/EP/PdfHtmlDocument.php
- +++ b/src/main/php/Align/EP/PdfHtmlDocument.php
- @@ -5,24 +5,34 @@ abstract class Align_EP_PdfHtmlDocument extends Align_EP_Component
- // protected $reportTitle = "REPORT TITLE HERE";
- protected $reportNumber;
- protected $cohortId;
- - protected $checkpointId;
- protected $facilityId;
- protected $departmentName;
- protected $previousCohortId;
- // protected $times;
- protected $generationTime;
- + protected $checkpointId;
- + protected $checkpoint;
- + protected $previousCheckpoint;
- +
- public function __construct( Align_EP_Registry $reg, $params ) {
- parent::__construct($reg);
- $this->reportNumber = $params['reportTypeId'];
- $this->cohortId = isset($params['cohortId']) ? $params['cohortId'] : null;
- - $this->checkpointId = isset($params['checkpointId']) ? $params['checkpointId'] : null;
- $this->facilityId = $params['facilityId'];
- $this->departmentName = (isset($params['departmentName'])) ? $params['departmentName'] : null ;
- $this->previousCohortId = (isset($params['previousCohortId'])) ? $params['previousCohortId'] : null ;
- $this->generationTime = isset($params['generationTime']) ? $params['generationTime'] : time();
- +
- + $this->checkpointId = isset($params['checkpointId']) ? $params['checkpointId'] : null;
- + if ($this->checkpointId) {
- + $this->checkpoint = $this->Checkpoint_Finder->loadCheckpoint($this->checkpointId);
- + if ($this->checkpoint['previous checkpoint ID']) {
- + $this->previousCheckpoint = $this->Checkpoint_Finder->loadCheckpoint($this->checkpoint['previous checkpoint ID']);
- + }
- + }
- }
- protected $_generationTimestamp;
- @@ -248,25 +258,20 @@ EOT;
- protected function getAdditionalParams() {
- if (!isset($this->_additionalParams)) {
- $paramsSql = <<<PARAMS
- - SELECT
- - fi.providertype,
- - ho.organizationid,
- - c.surveyversionid,
- - c.cycleid,
- - s.title as surveyversion
- - FROM aep.cohortfacility AS cf
- - JOIN aep.cohort AS c ON c.id = cf.cohortid
- - JOIN aep.facilityinfo AS fi ON fi.facilityid = cf.facilityid
- - JOIN aep.hierarchyorganization AS ho ON ho.hierarchyid = fi.facilityid
- + SELECT
- + c.providertype,
- + wafc.organizationid,
- + c.surveyversionid,
- + s.title as surveyversion
- + FROM aep.warehouseanswersforcheckpoint wafc
- + JOIN aep.checkpoint c ON wafc.checkpointid = c.id
- JOIN aep.surveyversion AS s ON c.surveyversionid = s.id
- - WHERE
- - cf.cohortid = {cohortId} AND
- - cf.facilityid = {facilityId};
- + WHERE wafc.checkpointid = {checkpointId}
- + GROUP BY wafc.organizationid, c.providertype, c.surveyversionid, s.title
- PARAMS;
- $this->_additionalParams = $this->storageHelper->queryRow($paramsSql, [
- - 'cohortId' => $this->cohortId,
- - 'facilityId' => $this->facilityId
- + 'checkpointId' => $this->checkpointId,
- ]);
- }
- @@ -285,10 +290,6 @@ PARAMS;
- return $this->getAdditionalParams()['organizationid'];
- }
- - protected function getCycleId() {
- - return $this->getAdditionalParams()['cycleid'];
- - }
- -
- protected function getCohortId() {
- return $this->cohortId;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement