@@ -44,11 +44,11 @@ |
||
44 | 44 | $fileMime=$_FILES['files']['type'][0]; |
45 | 45 | $tempFileLocation=$_FILES['files']['tmp_name'][0]; |
46 | 46 | $fileSize=$_FILES['files']['size'][0]; |
47 | - try{ |
|
47 | + try { |
|
48 | 48 | $formProcessor->storeAssociatedFile($fileKey, $fileMime, $fileSize, $tempFileLocation); |
49 | - echo( json_encode((true)) ); |
|
50 | - }catch (Throwable $t){ |
|
51 | - echo (json_encode((false)) ); |
|
49 | + echo(json_encode((true))); |
|
50 | + }catch (Throwable $t) { |
|
51 | + echo (json_encode((false))); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | }else { |
@@ -47,11 +47,11 @@ |
||
47 | 47 | try{ |
48 | 48 | $formProcessor->storeAssociatedFile($fileKey, $fileMime, $fileSize, $tempFileLocation); |
49 | 49 | echo( json_encode((true)) ); |
50 | - }catch (Throwable $t){ |
|
50 | + } catch (Throwable $t){ |
|
51 | 51 | echo (json_encode((false)) ); |
52 | 52 | } |
53 | 53 | |
54 | -}else { |
|
54 | +} else { |
|
55 | 55 | header('HTTP/1.0 403 Forbidden'); |
56 | 56 | die('You are not allowed to access this file.'); |
57 | 57 | } |
58 | 58 | \ No newline at end of file |
@@ -31,17 +31,20 @@ |
||
31 | 31 | if ($accessCheck && in_array($_SESSION['role'], array(User::INVESTIGATOR, User::REVIEWER))) { |
32 | 32 | |
33 | 33 | try { |
34 | - if ($_SESSION['role'] == User::INVESTIGATOR) $reviewObject=$visitObject->getReviewsObject(true); |
|
35 | - else $reviewObject=$visitObject->queryExistingReviewForReviewer($_SESSION['username']); |
|
34 | + if ($_SESSION['role'] == User::INVESTIGATOR) { |
|
35 | + $reviewObject=$visitObject->getReviewsObject(true); |
|
36 | + } else { |
|
37 | + $reviewObject=$visitObject->queryExistingReviewForReviewer($_SESSION['username']); |
|
38 | + } |
|
36 | 39 | $filePath=$reviewObject->getAssociatedFilePath($fileKey); |
37 | 40 | $answer=is_file($filePath); |
38 | - }catch (Exception $e) { |
|
41 | + } catch (Exception $e) { |
|
39 | 42 | $answer=false; |
40 | 43 | } |
41 | 44 | |
42 | 45 | echo(json_encode($answer)); |
43 | 46 | |
44 | -}else { |
|
47 | +} else { |
|
45 | 48 | header('HTTP/1.0 403 Forbidden'); |
46 | 49 | die('You are not allowed to access this file.'); |
47 | 50 | } |
48 | 51 | \ No newline at end of file |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | )); |
41 | 41 | $reviewData=$dataFetcher->fetch(PDO::FETCH_ASSOC); |
42 | 42 | |
43 | - if(empty($reviewData)) throw new Exception('No Review '.$id_review.' found'); |
|
43 | + if (empty($reviewData)) throw new Exception('No Review '.$id_review.' found'); |
|
44 | 44 | |
45 | 45 | $this->id_visit=$reviewData['id_visit']; |
46 | 46 | $this->username=$reviewData['username']; |
@@ -183,9 +183,9 @@ discard block |
||
183 | 183 | */ |
184 | 184 | public function getAssociatedFilePath(string $fileKey) : String { |
185 | 185 | $fileArray=$this->associatedFiles; |
186 | - if(array_key_exists($fileKey, $fileArray)){ |
|
186 | + if (array_key_exists($fileKey, $fileArray)) { |
|
187 | 187 | return $this->getAssociatedFileRootPath().'/'.$fileArray[$fileKey]; |
188 | - } else { |
|
188 | + }else { |
|
189 | 189 | throw new Exception('Non Existing Key'); |
190 | 190 | } |
191 | 191 | |
@@ -194,9 +194,9 @@ discard block |
||
194 | 194 | public function deleteAssociatedFile($fileKey) { |
195 | 195 | |
196 | 196 | if (!$this->validated) { |
197 | - $filePath = $this->getAssociatedFilePath($fileKey); |
|
198 | - if( ! is_file( $filePath ) ) throw new Exception('No File To Delete'); |
|
199 | - unlink( $filePath ); |
|
197 | + $filePath=$this->getAssociatedFilePath($fileKey); |
|
198 | + if (!is_file($filePath)) throw new Exception('No File To Delete'); |
|
199 | + unlink($filePath); |
|
200 | 200 | unset($this->associatedFiles[$fileKey]); |
201 | 201 | $this->updateAssociatedFiles($this->associatedFiles); |
202 | 202 |
@@ -40,7 +40,9 @@ discard block |
||
40 | 40 | )); |
41 | 41 | $reviewData=$dataFetcher->fetch(PDO::FETCH_ASSOC); |
42 | 42 | |
43 | - if(empty($reviewData)) throw new Exception('No Review '.$id_review.' found'); |
|
43 | + if(empty($reviewData)) { |
|
44 | + throw new Exception('No Review '.$id_review.' found'); |
|
45 | + } |
|
44 | 46 | |
45 | 47 | $this->id_visit=$reviewData['id_visit']; |
46 | 48 | $this->username=$reviewData['username']; |
@@ -109,7 +111,7 @@ discard block |
||
109 | 111 | if ($this->isLocal) { |
110 | 112 | $visitObject->resetQC(); |
111 | 113 | $visitObject->changeVisitStateInvestigatorForm(Visit::LOCAL_FORM_NOT_DONE); |
112 | - }else { |
|
114 | + } else { |
|
113 | 115 | $formProcessor=$visitObject->getFromProcessor($this->isLocal, $this->username); |
114 | 116 | $formProcessor->setVisitValidation(); |
115 | 117 | } |
@@ -162,7 +164,7 @@ discard block |
||
162 | 164 | |
163 | 165 | if ($result) { |
164 | 166 | return $finalFilename; |
165 | - }else { |
|
167 | + } else { |
|
166 | 168 | throw New Exception('Error writing associated File'); |
167 | 169 | } |
168 | 170 | |
@@ -195,12 +197,14 @@ discard block |
||
195 | 197 | |
196 | 198 | if (!$this->validated) { |
197 | 199 | $filePath = $this->getAssociatedFilePath($fileKey); |
198 | - if( ! is_file( $filePath ) ) throw new Exception('No File To Delete'); |
|
200 | + if( ! is_file( $filePath ) ) { |
|
201 | + throw new Exception('No File To Delete'); |
|
202 | + } |
|
199 | 203 | unlink( $filePath ); |
200 | 204 | unset($this->associatedFiles[$fileKey]); |
201 | 205 | $this->updateAssociatedFiles($this->associatedFiles); |
202 | 206 | |
203 | - }else { |
|
207 | + } else { |
|
204 | 208 | throw new Exception('Validated Review, can\'t remove file'); |
205 | 209 | } |
206 | 210 | |
@@ -233,7 +237,7 @@ discard block |
||
233 | 237 | |
234 | 238 | if ($this->isLocal) { |
235 | 239 | $visitObject->changeVisitStateInvestigatorForm(Visit::LOCAL_FORM_DRAFT); |
236 | - }else { |
|
240 | + } else { |
|
237 | 241 | $formProcessor=$visitObject->getFromProcessor($this->isLocal, $this->username); |
238 | 242 | $formProcessor->setVisitValidation(); |
239 | 243 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | foreach ($reviewsObjects as $reviewObject) { |
84 | 84 | |
85 | 85 | foreach ($reviewObject->associatedFiles as $associatedFileKey => $associatedFilePath) { |
86 | - $associatedFileLocation = $reviewObject->getAssociatedFilePath($associatedFileKey); |
|
86 | + $associatedFileLocation=$reviewObject->getAssociatedFilePath($associatedFileKey); |
|
87 | 87 | $zip->addFile($associatedFileLocation); |
88 | 88 | |
89 | 89 | }; |
@@ -256,9 +256,9 @@ discard block |
||
256 | 256 | $reviewDatas=$this->getGenericData($review); |
257 | 257 | $specificData=$review->getSpecificData(); |
258 | 258 | unset($specificData["id_review"]); |
259 | - $specificDataArray = []; |
|
260 | - if( !empty($specificData) ){ |
|
261 | - $specificDataArray = array_values($specificData); |
|
259 | + $specificDataArray=[]; |
|
260 | + if (!empty($specificData)) { |
|
261 | + $specificDataArray=array_values($specificData); |
|
262 | 262 | } |
263 | 263 | $reviewLine=[...$reviewDatas, ...$specificDataArray]; |
264 | 264 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $modalityCreatedVisits=$this->studyObject->getStudySpecificGroupManager($visitGroup->groupModality)->getCreatedVisits(); |
40 | 40 | $modalityDeletedVisits=$this->studyObject->getStudySpecificGroupManager($visitGroup->groupModality)->getCreatedVisits(true); |
41 | 41 | array_push($this->allcreatedVisits, ...$modalityCreatedVisits, ...$modalityDeletedVisits); |
42 | - }catch (Exception $e) { } |
|
42 | + } catch (Exception $e) { } |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
@@ -216,12 +216,12 @@ discard block |
||
216 | 216 | $localReviews=[]; |
217 | 217 | try { |
218 | 218 | $localReviews[]=$visitObject->getReviewsObject(true); |
219 | - }catch (Exception $e) { } |
|
219 | + } catch (Exception $e) { } |
|
220 | 220 | |
221 | 221 | $expertReviews=[]; |
222 | 222 | try { |
223 | 223 | $expertReviews=$visitObject->getReviewsObject(false, true); |
224 | - }catch (Exception $e) { } |
|
224 | + } catch (Exception $e) { } |
|
225 | 225 | |
226 | 226 | //Merge all reviews in an array |
227 | 227 | $reviewObjects=array_merge($localReviews, $expertReviews); |
@@ -320,29 +320,29 @@ discard block |
||
320 | 320 | |
321 | 321 | if ($visitObject->statusDone == Visit::NOT_DONE) { |
322 | 322 | return 0; |
323 | - }else if ($visitObject->uploadStatus == Visit::NOT_DONE || $visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
323 | + } else if ($visitObject->uploadStatus == Visit::NOT_DONE || $visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
324 | 324 | if ($visitObject->uploadStatus == Visit::NOT_DONE && $visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
325 | 325 | return 1; |
326 | - }else if ($visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
326 | + } else if ($visitObject->stateInvestigatorForm == Visit::NOT_DONE) { |
|
327 | 327 | return 3; |
328 | - }else if ($visitObject->uploadStatus == Visit::NOT_DONE) { |
|
328 | + } else if ($visitObject->uploadStatus == Visit::NOT_DONE) { |
|
329 | 329 | return 2; |
330 | 330 | } |
331 | - }else if ($visitObject->qcStatus == Visit::QC_NOT_DONE) { |
|
331 | + } else if ($visitObject->qcStatus == Visit::QC_NOT_DONE) { |
|
332 | 332 | return 4; |
333 | - }else if ($visitObject->qcStatus == Visit::QC_CORRECTIVE_ACTION_ASKED) { |
|
333 | + } else if ($visitObject->qcStatus == Visit::QC_CORRECTIVE_ACTION_ASKED) { |
|
334 | 334 | return 5; |
335 | - }else if ($visitObject->qcStatus == Visit::QC_REFUSED) { |
|
335 | + } else if ($visitObject->qcStatus == Visit::QC_REFUSED) { |
|
336 | 336 | return 6; |
337 | - }else if ($visitObject->reviewStatus == Visit::NOT_DONE) { |
|
337 | + } else if ($visitObject->reviewStatus == Visit::NOT_DONE) { |
|
338 | 338 | return 7; |
339 | - }else if ($visitObject->reviewStatus == Visit::REVIEW_ONGOING) { |
|
339 | + } else if ($visitObject->reviewStatus == Visit::REVIEW_ONGOING) { |
|
340 | 340 | return 8; |
341 | - }else if ($visitObject->reviewStatus == Visit::REVIEW_WAIT_ADJUDICATION) { |
|
341 | + } else if ($visitObject->reviewStatus == Visit::REVIEW_WAIT_ADJUDICATION) { |
|
342 | 342 | return 9; |
343 | - }else if ($visitObject->reviewStatus == Visit::REVIEW_DONE) { |
|
343 | + } else if ($visitObject->reviewStatus == Visit::REVIEW_DONE) { |
|
344 | 344 | return 10; |
345 | - }else { |
|
345 | + } else { |
|
346 | 346 | //If none of these case return -1, should not happen |
347 | 347 | return -1; |
348 | 348 | } |
@@ -48,8 +48,8 @@ |
||
48 | 48 | return 5; |
49 | 49 | } |
50 | 50 | |
51 | - private function createEmptySpecificForm(){ |
|
52 | - $insertion = $this->linkpdo->prepare('INSERT INTO '.$this->specificTable.' (id_review) VALUES (:id_review)'); |
|
51 | + private function createEmptySpecificForm() { |
|
52 | + $insertion=$this->linkpdo->prepare('INSERT INTO '.$this->specificTable.' (id_review) VALUES (:id_review)'); |
|
53 | 53 | $insertion->execute(array( |
54 | 54 | 'id_review' => $this->reviewObject->id_review ) |
55 | 55 | ); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (empty($this->reviewObject)) { |
65 | 65 | $this->createReview(); |
66 | 66 | $this->createEmptySpecificForm(); |
67 | - }else { |
|
67 | + } else { |
|
68 | 68 | //If review exist but validated throw exception |
69 | 69 | if ($this->reviewObject->validated) { |
70 | 70 | throw new Exception('Validated Review, can\'t add File'); |
@@ -74,9 +74,15 @@ discard block |
||
74 | 74 | //Get extension of file and check extension is allowed |
75 | 75 | //Get filesize and check it matches limits |
76 | 76 | $sizeMb=$fileSize/1048576; |
77 | - if ($sizeMb > $this->getMaxSizeMb()) throw new Exception('File over limits'); |
|
78 | - if (!$this->isInDeclaredKey($fileKey)) throw new Exception('Unhauthrized file key'); |
|
79 | - if (!$this->isInAllowedType($mime)) throw new Exception('Extension not allowed'); |
|
77 | + if ($sizeMb > $this->getMaxSizeMb()) { |
|
78 | + throw new Exception('File over limits'); |
|
79 | + } |
|
80 | + if (!$this->isInDeclaredKey($fileKey)) { |
|
81 | + throw new Exception('Unhauthrized file key'); |
|
82 | + } |
|
83 | + if (!$this->isInAllowedType($mime)) { |
|
84 | + throw new Exception('Extension not allowed'); |
|
85 | + } |
|
80 | 86 | |
81 | 87 | $mimes=new \Mimey\MimeTypes; |
82 | 88 | $extension=$mimes->getExtension($mime); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | //Generate zip from orthanc and output it to the navigator |
40 | 40 | $orthanc=new Orthanc(); |
41 | 41 | $zipStream=$orthanc->getZipStream($resultatsIDs); |
42 | - $fstat = fstat($zipStream); |
|
42 | + $fstat=fstat($zipStream); |
|
43 | 43 | |
44 | 44 | header("Content-Type: application/zip"); |
45 | 45 | header("Content-Transfer-Encoding: Binary"); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | header("Expires: 0"); |
52 | 52 | |
53 | 53 | rewind($zipStream); |
54 | - if(!$zipStream) exit('no file to stream'); |
|
54 | + if (!$zipStream) exit('no file to stream'); |
|
55 | 55 | |
56 | 56 | while (!feof($zipStream)) { |
57 | 57 | print(@fread($zipStream, 1024*1024)); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | fclose($zipStream); |
62 | 62 | |
63 | -} else { |
|
63 | +}else { |
|
64 | 64 | header('HTTP/1.0 403 Forbidden'); |
65 | 65 | die('You are not allowed to access this file.'); |
66 | 66 | } |
67 | 67 | \ No newline at end of file |
@@ -51,7 +51,9 @@ |
||
51 | 51 | header("Expires: 0"); |
52 | 52 | |
53 | 53 | rewind($zipStream); |
54 | - if(!$zipStream) exit('no file to stream'); |
|
54 | + if(!$zipStream) { |
|
55 | + exit('no file to stream'); |
|
56 | + } |
|
55 | 57 | |
56 | 58 | while (!feof($zipStream)) { |
57 | 59 | print(@fread($zipStream, 1024*1024)); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $orthanc=new Orthanc(); |
67 | 67 | |
68 | 68 | $zipStream=$orthanc->getZipStream($ids); |
69 | - $fstat = fstat($zipStream); |
|
69 | + $fstat=fstat($zipStream); |
|
70 | 70 | |
71 | 71 | header("Content-Type: application/zip"); |
72 | 72 | header("Content-Transfer-Encoding: Binary"); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | header("Expires: 0"); |
90 | 90 | |
91 | 91 | rewind($zipStream); |
92 | - if(!$zipStream) exit('no file to stream'); |
|
92 | + if (!$zipStream) exit('no file to stream'); |
|
93 | 93 | |
94 | 94 | while (!feof($zipStream)) { |
95 | 95 | print(@fread($zipStream, 1024*1024)); |
@@ -39,19 +39,18 @@ discard block |
||
39 | 39 | $json=json_decode($postdata, true); |
40 | 40 | //SK ICI VERIFIER QUE LES id SONT BIEN DE L ETUDE AVEC LES DROITS ? Securite |
41 | 41 | $ids=$json['json']; |
42 | -} |
|
43 | -else if ($_SESSION['role'] == User::REVIEWER) { |
|
42 | +} else if ($_SESSION['role'] == User::REVIEWER) { |
|
44 | 43 | $permissionCheck=$userObject->isVisitAllowed($_POST['id_visit'], $_SESSION['role']); |
45 | 44 | $visitObject=new Visit($_POST['id_visit'], $linkpdo); |
46 | 45 | $ids=$visitObject->getSeriesOrthancID(); |
47 | 46 | |
48 | -}else if ($_SESSION['role'] == User::CONTROLLER) { |
|
47 | +} else if ($_SESSION['role'] == User::CONTROLLER) { |
|
49 | 48 | $permissionCheck=$userObject->isVisitAllowed($_POST['id_visit'], $_SESSION['role']); |
50 | 49 | $visitObject=new Visit($_POST['id_visit'], $linkpdo); |
51 | 50 | if (in_array($visitObject->qcStatus, array(Visit::QC_NOT_DONE, Visit::QC_WAIT_DEFINITVE_CONCLUSION))) { |
52 | 51 | $ids=$visitObject->getSeriesOrthancID(); |
53 | 52 | } |
54 | -}else if ($_SESSION['role'] == User::INVESTIGATOR) { |
|
53 | +} else if ($_SESSION['role'] == User::INVESTIGATOR) { |
|
55 | 54 | $permissionCheck=$userObject->isVisitAllowed($_POST['id_visit'], $_SESSION['role']); |
56 | 55 | $visitObject=new Visit($_POST['id_visit'], $linkpdo); |
57 | 56 | if ($visitObject->uploadStatus == Visit::DONE) { |
@@ -78,7 +77,7 @@ discard block |
||
78 | 77 | $date=Date('Ymd_his'); |
79 | 78 | header('Content-Disposition: attachment; filename="Dicom-'.$_SESSION['study'].'_'.$date.'.zip"'); |
80 | 79 | //For reviewer file name is identified by study_visit |
81 | - }else { |
|
80 | + } else { |
|
82 | 81 | $name=$_SESSION['study'].$visitObject->visitType; |
83 | 82 | header('Content-Disposition: attachment; filename="Dicom'.$name.'.zip"'); |
84 | 83 | } |
@@ -89,7 +88,9 @@ discard block |
||
89 | 88 | header("Expires: 0"); |
90 | 89 | |
91 | 90 | rewind($zipStream); |
92 | - if(!$zipStream) exit('no file to stream'); |
|
91 | + if(!$zipStream) { |
|
92 | + exit('no file to stream'); |
|
93 | + } |
|
93 | 94 | |
94 | 95 | while (!feof($zipStream)) { |
95 | 96 | print(@fread($zipStream, 1024*1024)); |
@@ -98,7 +99,7 @@ discard block |
||
98 | 99 | |
99 | 100 | fclose($zipStream); |
100 | 101 | |
101 | -}else { |
|
102 | +} else { |
|
102 | 103 | header('HTTP/1.0 403 Forbidden'); |
103 | 104 | die('You are not allowed to access this file.'); |
104 | 105 | } |
105 | 106 | \ No newline at end of file |
@@ -35,17 +35,17 @@ |
||
35 | 35 | $visitObject=new Visit($id_visit, $linkpdo); |
36 | 36 | |
37 | 37 | try { |
38 | - $formProcessor = $visitObject->getFromProcessor(false, $username); |
|
39 | - $reviewData = $formProcessor->getExistingFormData(); |
|
38 | + $formProcessor=$visitObject->getFromProcessor(false, $username); |
|
39 | + $reviewData=$formProcessor->getExistingFormData(); |
|
40 | 40 | echo(json_encode($reviewData)); |
41 | 41 | |
42 | - } catch (Exception $e) { |
|
42 | + }catch (Exception $e) { |
|
43 | 43 | error_log($e->getMessage()); |
44 | 44 | header('HTTP/1.0 404 Not Found'); |
45 | 45 | } |
46 | 46 | |
47 | 47 | |
48 | -} else { |
|
48 | +}else { |
|
49 | 49 | header('HTTP/1.0 403 Forbidden'); |
50 | 50 | die('You are not allowed to access this file.'); |
51 | 51 |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | throw new Exception("Error during save"); |
123 | 123 | } |
124 | 124 | |
125 | - if($update){ |
|
125 | + if ($update) { |
|
126 | 126 | $this->reviewObject->updateReviewDate(); |
127 | 127 | } |
128 | 128 | |
@@ -254,9 +254,9 @@ discard block |
||
254 | 254 | * can be overrided to add additional data such as investigator form data |
255 | 255 | */ |
256 | 256 | public function getExistingFormData() { |
257 | - if( ! empty($this->reviewObject)){ |
|
257 | + if (!empty($this->reviewObject)) { |
|
258 | 258 | return ($this->reviewObject->getSpecificData()); |
259 | - }else{ |
|
259 | + }else { |
|
260 | 260 | return []; |
261 | 261 | } |
262 | 262 |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | if (empty($this->reviewObject)) { |
103 | 103 | $this->createReview(); |
104 | 104 | $update=false; |
105 | - }else { |
|
105 | + } else { |
|
106 | 106 | $update=true; |
107 | 107 | //If already existing validated review, exit without modifying anything |
108 | 108 | if ($this->reviewObject->validated) { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | //Call the child redifined save specific form to save the specific data of the form |
115 | 115 | try { |
116 | 116 | $this->saveSpecificForm($data, $this->reviewObject->id_review, $update); |
117 | - }catch (Exception $e) { |
|
117 | + } catch (Exception $e) { |
|
118 | 118 | error_log($e->getMessage()); |
119 | 119 | if (!$update) { |
120 | 120 | $this->reviewObject->hardDeleteReview(); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | if ($this->local) { |
134 | 134 | if ($validate) { |
135 | 135 | $this->visitObject->changeVisitStateInvestigatorForm(Visit::LOCAL_FORM_DONE); |
136 | - }else { |
|
136 | + } else { |
|
137 | 137 | $this->visitObject->changeVisitStateInvestigatorForm(Visit::LOCAL_FORM_DRAFT); |
138 | 138 | } |
139 | 139 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | //Log Activity |
142 | 142 | if ($this->local) { |
143 | 143 | $role="Investigator"; |
144 | - }else { |
|
144 | + } else { |
|
145 | 145 | $role="Reviewer"; |
146 | 146 | } |
147 | 147 | $actionDetails['patient_code']=$this->visitObject->patientCode; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | ->addGroupEmails($this->visitObject->study, User::SUPERVISOR); |
185 | 185 | $email->sendAwaitingAdjudicationMessage($this->visitObject->study, $this->visitObject->patientCode, $this->visitObject->visitType); |
186 | 186 | |
187 | - }else if ($reviewStatus == Visit::REVIEW_DONE) { |
|
187 | + } else if ($reviewStatus == Visit::REVIEW_DONE) { |
|
188 | 188 | |
189 | 189 | $email=new Send_Email($this->linkpdo); |
190 | 190 | $uploaderUserObject=new User($this->visitObject->uploaderUsername, $this->linkpdo); |
@@ -206,11 +206,11 @@ discard block |
||
206 | 206 | try { |
207 | 207 | if ($this->local) { |
208 | 208 | $this->reviewObject=$this->visitObject->getReviewsObject(true); |
209 | - }else { |
|
209 | + } else { |
|
210 | 210 | $this->reviewObject=$this->visitObject->queryExistingReviewForReviewer($this->username); |
211 | 211 | } |
212 | 212 | |
213 | - }catch (Exception $e) { } |
|
213 | + } catch (Exception $e) { } |
|
214 | 214 | |
215 | 215 | return $this->reviewObject; |
216 | 216 | |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $validatedReviewObjects=array_filter($reviewsObject, function($review) { |
240 | 240 | if ($review->validated) { |
241 | 241 | return true; |
242 | - }else { |
|
242 | + } else { |
|
243 | 243 | return false; |
244 | 244 | } |
245 | 245 | }); |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | public function getExistingFormData() { |
257 | 257 | if( ! empty($this->reviewObject)){ |
258 | 258 | return ($this->reviewObject->getSpecificData()); |
259 | - }else{ |
|
259 | + } else{ |
|
260 | 260 | return []; |
261 | 261 | } |
262 | 262 |