Completed
Push — master ( 17af13...acdc2b )
by Andrzej
02:44
created
src/Entities/InfectionRaport.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	/**
87 87
 	 * getId
88 88
 	 *
89
-	 * @return id
89
+	 * @return integer
90 90
 	 */
91 91
 	public function getId() {
92 92
 		return $this->id;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @param int $id
99 99
 	 *        	ID
100 100
 	 *        	
101
-	 * @return \Hospitalplugin\Entities\Patient
101
+	 * @return InfectionRaport
102 102
 	 */
103 103
 	public function setId($id) {
104 104
 		$this->id = $id;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -70,16 +70,16 @@  discard block
 block discarded – undo
70 70
 	protected $user;
71 71
 	
72 72
 	function __construct($args) {
73
-		foreach ( $args as $key => $value ) {
73
+		foreach ($args as $key => $value) {
74 74
 			if ($key == 'dataRaportu') {
75
-				$value = new \DateTime ( $value );
75
+				$value = new \DateTime($value);
76 76
 			} 
77
-			call_user_func ( array (
77
+			call_user_func(array(
78 78
 					$this,
79
-					'set' . $key 
80
-			), $value );
79
+					'set'.$key 
80
+			), $value);
81 81
 		}
82
-		$this->dataPrzeslania = new \DateTime ();
82
+		$this->dataPrzeslania = new \DateTime();
83 83
 		echo '<h3><div class="alert alert-primary">Dziękuję za przesłanie raportu!</div></h3>';
84 84
 	}
85 85
 	
@@ -111,12 +111,12 @@  discard block
 block discarded – undo
111 111
 	 * @return string
112 112
 	 */
113 113
 	public function toString() {
114
-		$txt = $this->getId ();
115
-		$data = $this->getDataRaportu ();
114
+		$txt = $this->getId();
115
+		$data = $this->getDataRaportu();
116 116
 		if ($data instanceof \DateTime) {
117
-			$txt .= $this->getDataRaportu ()->format ( "Y-m-d" );
117
+			$txt .= $this->getDataRaportu()->format("Y-m-d");
118 118
 		} else {
119
-			$txt .= $this->getDataRaportu ();
119
+			$txt .= $this->getDataRaportu();
120 120
 		}
121 121
 		return $txt;
122 122
 	}
Please login to merge, or discard this patch.
src/Entities/InfectionsCRUD.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -28,6 +28,12 @@
 block discarded – undo
28 28
 use Hospitalplugin\utils\Utils;
29 29
 
30 30
 class InfectionsCRUD {
31
+
32
+	/**
33
+	 * @param string $from
34
+	 * @param string $to
35
+	 * @param string $class
36
+	 */
31 37
 	public static function getInfections($from, $to, $wardId, $class) {
32 38
 		$em = ( object ) DoctrineBootstrap::getEntityManager ();
33 39
 		$qb = $em->createQueryBuilder ();
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,33 +29,33 @@
 block discarded – undo
29 29
 
30 30
 class InfectionsCRUD {
31 31
 	public static function getInfections($from, $to, $wardId, $class) {
32
-		$em = ( object ) DoctrineBootstrap::getEntityManager ();
33
-		$qb = $em->createQueryBuilder ();
34
-		$qb->select ( 'i' )->from ( 'Hospitalplugin\Entities\\' . $class, 'i' ) /* */
35
-        ->addOrderBy ( 'i.dataRaportu', 'DESC' ) /* */
36
-        ->addOrderBy ( 'i.dataPrzeslania ', 'DESC' ) /* */
37
-        ->where ( /* */
38
-        		$qb->expr ()->between ( 'i.dataRaportu', ':from', ':to' ) ) /* */
39
-        		->setParameters ( array (
32
+		$em = (object) DoctrineBootstrap::getEntityManager();
33
+		$qb = $em->createQueryBuilder();
34
+		$qb->select('i')->from('Hospitalplugin\Entities\\'.$class, 'i') /* */
35
+        ->addOrderBy('i.dataRaportu', 'DESC') /* */
36
+        ->addOrderBy('i.dataPrzeslania ', 'DESC') /* */
37
+        ->where( /* */
38
+        		$qb->expr()->between('i.dataRaportu', ':from', ':to') ) /* */
39
+        		->setParameters(array(
40 40
 				'from' => $from,
41 41
 				'to' => $to 
42
-		) );
42
+		));
43 43
 		if ($wardId != 'all') {
44
-			$qb->andWhere ( $qb->expr ()->eq ( 'i.ward', ':ward' ) ) /* */
45
-        			->setParameter ( 'ward', $wardId );
44
+			$qb->andWhere($qb->expr()->eq('i.ward', ':ward')) /* */
45
+        			->setParameter('ward', $wardId);
46 46
 		}
47 47
 		
48
-		$query = $qb->getQuery ();
49
-		$infections = $query->getResult ();
48
+		$query = $qb->getQuery();
49
+		$infections = $query->getResult();
50 50
 		
51 51
 		return $infections;
52 52
 	}
53 53
 	public static function updateVerification($id, $weryfikacja) {
54 54
 		if ($id != null && $weryfikacja != null) {
55
-			$em = ( object ) DoctrineBootstrap::getEntityManager ();
56
-			$infection = $em->getRepository ( 'Hospitalplugin\Entities\Infections' )->find ( $id );
57
-			$infection->setWeryfikacja ( $weryfikacja );
58
-			$em->flush ();
55
+			$em = (object) DoctrineBootstrap::getEntityManager();
56
+			$infection = $em->getRepository('Hospitalplugin\Entities\Infections')->find($id);
57
+			$infection->setWeryfikacja($weryfikacja);
58
+			$em->flush();
59 59
 		}
60 60
 	}
61 61
 	public static function obj2DB($obj) {
Please login to merge, or discard this patch.
src/Entities/Patient.php 2 patches
Doc Comments   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	/**
111 111
 	 * Constructor
112 112
 	 *
113
-	 * @param unknown $args        	
113
+	 * @param integer $args        	
114 114
 	 */
115 115
 	function __construct($args) {
116 116
 		if (! isset ( $args ) || empty ( $args )) {
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	/**
131 131
 	 * getId
132 132
 	 *
133
-	 * @return id
133
+	 * @return integer
134 134
 	 */
135 135
 	public function getId() {
136 136
 		return $this->id;
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	/**
153 153
 	 * getName
154 154
 	 *
155
-	 * @return name
155
+	 * @return string
156 156
 	 */
157 157
 	public function getName() {
158 158
 		return $this->name;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	/**
197 197
 	 * getOddzialId
198 198
 	 *
199
-	 * @return oddzialId
199
+	 * @return integer
200 200
 	 */
201 201
 	public function getOddzialId() {
202 202
 		return $this->oddzialId;
@@ -236,8 +236,6 @@  discard block
 block discarded – undo
236 236
 	/**
237 237
 	 * setOddzialId
238 238
 	 *
239
-	 * @param int $oddzialId
240
-	 *        	oddzial id
241 239
 	 *        	
242 240
 	 * @return Patient
243 241
 	 */
@@ -249,7 +247,7 @@  discard block
 block discarded – undo
249 247
 	/**
250 248
 	 * getPesel
251 249
 	 *
252
-	 * @return pesel
250
+	 * @return string
253 251
 	 */
254 252
 	public function getPesel() {
255 253
 		return $this->pesel;
@@ -271,7 +269,7 @@  discard block
 block discarded – undo
271 269
 	/**
272 270
 	 * getKategoriaPacjenta
273 271
 	 *
274
-	 * @return kategoriaPacjenta
272
+	 * @return integer
275 273
 	 */
276 274
 	public function getKategoriaPacjenta() {
277 275
 		return $this->kategoriaPacjenta;
@@ -293,7 +291,7 @@  discard block
 block discarded – undo
293 291
 	/**
294 292
 	 * getTyp
295 293
 	 *
296
-	 * @return typ
294
+	 * @return string
297 295
 	 */
298 296
 	public function getTyp() {
299 297
 		return $this->typ;
@@ -396,7 +394,6 @@  discard block
 block discarded – undo
396 394
 	 * String with comma separated values.
397 395
 	 *
398 396
 	 * @deprecated JSON used
399
-	 * @param unknown $patient        	
400 397
 	 *
401 398
 	 * @return string
402 399
 	 */
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -113,17 +113,17 @@  discard block
 block discarded – undo
113 113
 	 * @param unknown $args        	
114 114
 	 */
115 115
 	function __construct($args) {
116
-		if (! isset ( $args ) || empty ( $args )) {
116
+		if (!isset ($args) || empty ($args)) {
117 117
 			return;
118 118
 		}
119
-		foreach ( $args as $key => $value ) {
119
+		foreach ($args as $key => $value) {
120 120
 			if ($key == 'dataKategoryzacji') {
121
-				$value = new \DateTime ( $value . ' 12:00:00' );
121
+				$value = new \DateTime($value.' 12:00:00');
122 122
 			}
123
-			call_user_func ( array (
123
+			call_user_func(array(
124 124
 					$this,
125
-					'set' . $key 
126
-			), $value );
125
+					'set'.$key 
126
+			), $value);
127 127
 		}
128 128
 	}
129 129
 	
@@ -333,23 +333,23 @@  discard block
 block discarded – undo
333 333
 	 * @return string
334 334
 	 */
335 335
 	public function toString() {
336
-		$txt = $this->getName ();
337
-		$txt .= $this->getPesel ();
336
+		$txt = $this->getName();
337
+		$txt .= $this->getPesel();
338 338
 		$txt .= "id:";
339
-		$txt .= $this->getId ();
339
+		$txt .= $this->getId();
340 340
 		$txt .= "oid:";
341
-		$txt .= $this->getOddzialId ();
341
+		$txt .= $this->getOddzialId();
342 342
 		$txt .= "d:";
343
-		$data = $this->getDataKategoryzacji ();
343
+		$data = $this->getDataKategoryzacji();
344 344
 		if ($data instanceof \DateTime) {
345
-			$txt .= $this->getDataKategoryzacji ()->format ( "Y-m-d" );
345
+			$txt .= $this->getDataKategoryzacji()->format("Y-m-d");
346 346
 		} else {
347
-			$txt .= $this->getDataKategoryzacji ();
347
+			$txt .= $this->getDataKategoryzacji();
348 348
 		}
349 349
 		return $txt;
350 350
 	}
351 351
 	public function __toString() {
352
-		return $this->toString ();
352
+		return $this->toString();
353 353
 	}
354 354
 	
355 355
 	/**
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 	 * @return multitype:string
359 359
 	 */
360 360
 	protected static function getFields() {
361
-		$fields = array (
361
+		$fields = array(
362 362
 				"id",
363 363
 				"name",
364 364
 				"pesel",
@@ -375,21 +375,21 @@  discard block
 block discarded – undo
375 375
 	 * @return string
376 376
 	 */
377 377
 	public function toDatatablesJSONString() {
378
-		$return_object_array = [ ];
379
-		$fields = $this->getFields ();
380
-		foreach ( $fields as $field ) {
381
-			$value = call_user_func ( array (
378
+		$return_object_array = [];
379
+		$fields = $this->getFields();
380
+		foreach ($fields as $field) {
381
+			$value = call_user_func(array(
382 382
 					$this,
383
-					'get' . $field 
384
-			) );
383
+					'get'.$field 
384
+			));
385 385
 			if ($value instanceof \DateTime) {
386
-				$value = $value->format ( 'Y-m-d' );
386
+				$value = $value->format('Y-m-d');
387 387
 			}
388
-			array_push ( $return_object_array, array (
388
+			array_push($return_object_array, array(
389 389
 					$field => $value 
390
-			) );
390
+			));
391 391
 		}
392
-		return json_encode ( $this );
392
+		return json_encode($this);
393 393
 	}
394 394
 	
395 395
 	/**
@@ -402,19 +402,19 @@  discard block
 block discarded – undo
402 402
 	 */
403 403
 	public function toDatatablesString() {
404 404
 		$string = "";
405
-		$fields = $this::getFields ();
406
-		foreach ( $fields as $field ) {
407
-			$value = call_user_func ( array (
405
+		$fields = $this::getFields();
406
+		foreach ($fields as $field) {
407
+			$value = call_user_func(array(
408 408
 					$this,
409
-					'get' . $field 
410
-			) );
409
+					'get'.$field 
410
+			));
411 411
 			if ($value instanceof \DateTime) {
412
-				$value = $value->format ( 'Y-m-d' );
412
+				$value = $value->format('Y-m-d');
413 413
 			}
414
-			$string .= $value . ",";
414
+			$string .= $value.",";
415 415
 		}
416
-		$string = trim ( $string, "," );
417
-		$string = str_replace ( "\n", "", $string );
416
+		$string = trim($string, ",");
417
+		$string = str_replace("\n", "", $string);
418 418
 		return $string;
419 419
 	}
420 420
 }
Please login to merge, or discard this patch.
src/Entities/PatientCRUD.php 2 patches
Doc Comments   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,11 +51,9 @@  discard block
 block discarded – undo
51 51
 	 *
52 52
 	 * TODO(AM) testy na przypadki graniczne - pacjenci z data przed polnoca, po polnocy, godzina przed obecna, po obecnej
53 53
 	 *
54
-	 * @param int $day
55
-	 *        	dayOfTheMonth
56
-	 * @param int $month
57
-	 *        	month
58 54
 	 *        	
55
+	 * @param string $date1
56
+	 * @param string $date2
59 57
 	 * @return Patient array
60 58
 	 */
61 59
 	public static function getPatientsDateRange($date1, $date2, $wardId = 0) {
@@ -73,7 +71,7 @@  discard block
 block discarded – undo
73 71
 	/**
74 72
 	 * getPatient
75 73
 	 *
76
-	 * @param $id $id
74
+	 * @param integer $id
77 75
 	 *        	int
78 76
 	 *        	
79 77
 	 * @return Patient Patient
@@ -111,7 +109,6 @@  discard block
 block discarded – undo
111 109
 	/**
112 110
 	 * setPatientCategories
113 111
 	 *
114
-	 * @param Patient $obj        	
115 112
 	 *
116 113
 	 * @return Patient
117 114
 	 */
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @return Patient array
44 44
 	 */
45 45
 	public static function getPatients($month = null, $day = null, $wardId = 0) {
46
-		return PatientCRUD::getPatientsDateRange ( Utils::getStartDate ( $month, $day ), Utils::getEndDate ( $month, $day ), $wardId );
46
+		return PatientCRUD::getPatientsDateRange(Utils::getStartDate($month, $day), Utils::getEndDate($month, $day), $wardId);
47 47
 	}
48 48
 	
49 49
 	/**
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
 	 * @return Patient array
60 60
 	 */
61 61
 	public static function getPatientsDateRange($date1, $date2, $wardId = 0) {
62
-		$entityManager = ( object ) DoctrineBootstrap::getEntityManager ();
63
-		$params = array (
62
+		$entityManager = (object) DoctrineBootstrap::getEntityManager();
63
+		$params = array(
64 64
 				'from' => $date1,
65 65
 				'to' => $date2,
66 66
 				'oddzialId' => $wardId 
67 67
 		);
68
-		$q = $entityManager->createQuery ( 'select p FROM Hospitalplugin\Entities\Patient p WHERE p.dataKategoryzacji BETWEEN :from AND :to and p.oddzialId = :oddzialId ORDER BY p.name' )->setParameters ( $params )->setFirstResult ( 0 )->setMaxResults ( 1000 );
69
-		$patients = $q->getResult ();
68
+		$q = $entityManager->createQuery('select p FROM Hospitalplugin\Entities\Patient p WHERE p.dataKategoryzacji BETWEEN :from AND :to and p.oddzialId = :oddzialId ORDER BY p.name')->setParameters($params)->setFirstResult(0)->setMaxResults(1000);
69
+		$patients = $q->getResult();
70 70
 		return $patients;
71 71
 	}
72 72
 	
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
 	 * @return Patient Patient
80 80
 	 */
81 81
 	public static function getPatient($id, $type = '') {
82
-		$entityManager = ( object ) DoctrineBootstrap::getEntityManager ();
83
-		$type = 'Hospitalplugin\Entities\Patient' . $type;
84
-		$patient = $entityManager->getRepository ( $type )->findOneBy ( array (
82
+		$entityManager = (object) DoctrineBootstrap::getEntityManager();
83
+		$type = 'Hospitalplugin\Entities\Patient'.$type;
84
+		$patient = $entityManager->getRepository($type)->findOneBy(array(
85 85
 				'id' => $id 
86
-		) );
87
-		return Utils::cast ( $type, ( object ) $patient, 0 );
86
+		));
87
+		return Utils::cast($type, (object) $patient, 0);
88 88
 	}
89 89
 	
90 90
 	/**
@@ -95,16 +95,16 @@  discard block
 block discarded – undo
95 95
 	 * @return Patient
96 96
 	 */
97 97
 	public static function setPatientCategories($obj, $type) {
98
-		$entityManager = DoctrineBootstrap::getEntityManager ();
99
-		$patient = PatientCRUD::getPatient ( $obj->id, $type );
100
-		foreach ( get_object_vars ( $obj ) as $key => $value ) {
101
-			call_user_func ( array (
98
+		$entityManager = DoctrineBootstrap::getEntityManager();
99
+		$patient = PatientCRUD::getPatient($obj->id, $type);
100
+		foreach (get_object_vars($obj) as $key => $value) {
101
+			call_user_func(array(
102 102
 					$patient,
103
-					'set' . ucwords ( $key ) 
104
-			), $value );
103
+					'set'.ucwords($key) 
104
+			), $value);
105 105
 		}
106
-		$entityManager->merge ( $patient );
107
-		$entityManager->flush ();
106
+		$entityManager->merge($patient);
107
+		$entityManager->flush();
108 108
 		return $patient;
109 109
 	}
110 110
 	
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 	 * @return Patient
117 117
 	 */
118 118
 	public static function createPatient($type, $name, $pesel) {
119
-		$entityManager = DoctrineBootstrap::getEntityManager ();
120
-		$type = 'Hospitalplugin\Entities\Patient' . $type;
121
-		$patient = new $type ();
122
-		$patient->setName ( $name );
123
-		$patient->setPesel ( $pesel );
124
-		$entityManager->persist ( $patient );
125
-		$entityManager->flush ();
119
+		$entityManager = DoctrineBootstrap::getEntityManager();
120
+		$type = 'Hospitalplugin\Entities\Patient'.$type;
121
+		$patient = new $type();
122
+		$patient->setName($name);
123
+		$patient->setPesel($pesel);
124
+		$entityManager->persist($patient);
125
+		$entityManager->flush();
126 126
 		return $patient;
127 127
 	}
128 128
 	
@@ -133,19 +133,19 @@  discard block
 block discarded – undo
133 133
 	 *        	int
134 134
 	 */
135 135
 	public static function deletePatient($id, $userId = 0) {
136
-		$entityManager = ( object ) DoctrineBootstrap::getEntityManager ();
136
+		$entityManager = (object) DoctrineBootstrap::getEntityManager();
137 137
 		$type = 'Hospitalplugin\Entities\Patient';
138
-		$patient = $entityManager->getRepository ( $type )->findOneBy ( array (
138
+		$patient = $entityManager->getRepository($type)->findOneBy(array(
139 139
 				'id' => $id 
140
-		) );
141
-		$entityManager->remove ( $patient );
140
+		));
141
+		$entityManager->remove($patient);
142 142
 		$log = strval($patient);
143 143
 		$audit = new PatientDeleted();
144
-		$audit->deletedAt = new \DateTime ();
144
+		$audit->deletedAt = new \DateTime();
145 145
 		$audit->deletedByUserId = $userId;
146 146
 		$audit->log = $log;
147
-		$entityManager->persist ( $audit );
148
-		$entityManager->flush ();
147
+		$entityManager->persist($audit);
148
+		$entityManager->flush();
149 149
 	}
150 150
 }
151 151
 ?>
152 152
\ No newline at end of file
Please login to merge, or discard this patch.
src/Entities/PatientDIA.php 1 patch
Doc Comments   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public $edukacjaZdrowotnaIOpiekaPsychospoleczna;
82 82
     //
83 83
     /**
84
-     * @return aktywnoscFizyczna
84
+     * @return integer
85 85
      */
86 86
     public function getAktywnoscFizyczna()
87 87
     {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     /**
92 92
      * @param int $aktywnoscFizyczna int aktywnoscFizyczna
93
-     * @return PatientZZ
93
+     * @return PatientDIA
94 94
      */
95 95
     public function setAktywnoscFizyczna($aktywnoscFizyczna)
96 96
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     /**
102
-     * @return higiena
102
+     * @return integer
103 103
      */
104 104
     public function getHigiena()
105 105
     {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     /**
110 110
      * @param int $higiena int higiena
111
-     * @return PatientZZ
111
+     * @return PatientDIA
112 112
      */
113 113
     public function setHigiena($higiena)
114 114
     {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     }
118 118
 
119 119
     /**
120
-     * @return odzywianie
120
+     * @return integer
121 121
      */
122 122
     public function getOdzywianie()
123 123
     {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     /**
128 128
      * @param  int $odzywianie int odzywianie
129
-     * @return PatientZZ
129
+     * @return PatientDIA
130 130
      */
131 131
     public function setOdzywianie($odzywianie)
132 132
     {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     }
136 136
 
137 137
     /**
138
-     * @return wydalanie
138
+     * @return integer
139 139
      */
140 140
     public function getWydalanie()
141 141
     {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     /**
146 146
      * @param  int $wydalanie int wydalanie
147
-     * @return PatientZZ
147
+     * @return PatientDIA
148 148
      */
149 149
     public function setWydalanie($wydalanie)
150 150
     {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     }
154 154
 
155 155
     /**
156
-     * @return pomiarParametrowZyciowych
156
+     * @return integer
157 157
      */
158 158
     public function getPomiarParametrowZyciowych()
159 159
     {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
     /**
164 164
      * @param  int $pomiarParametrowZyciowych int pomiarParametrowZyciowych
165
-     * @return PatientZZ
165
+     * @return PatientDIA
166 166
      */
167 167
     public function setPomiarParametrowZyciowych($pomiarParametrowZyciowych)
168 168
     {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     }
172 172
 
173 173
     /**
174
-     * @return leczenie
174
+     * @return integer
175 175
      */
176 176
     public function getLeczenie()
177 177
     {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
     /**
182 182
      * @param  int $leczenie int leczenie
183
-     * @return PatientZZ
183
+     * @return PatientDIA
184 184
      */
185 185
     public function setLeczenie($leczenie)
186 186
     {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
     /**
200 200
      * @param  int $edukacjaZdrowotnaIOpiekaPsychospoleczna int edukacjaZdrowotnaIOpiekaPsychospoleczna
201
-     * @return PatientZZ
201
+     * @return PatientDIA
202 202
      */
203 203
     public function setEdukacjaZdrowotnaIOpiekaPsychospoleczna($edukacjaZdrowotnaIOpiekaPsychospoleczna)
204 204
     {
Please login to merge, or discard this patch.
src/Entities/PatientPED.php 1 patch
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * getaktywnoscFizyczna
85 85
      * 
86
-     * @return aktywnoscFizyczna int
86
+     * @return integer int
87 87
      */
88 88
     public function getAktywnoscFizyczna()
89 89
     {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     /**
107 107
      * getHigiena
108 108
      * 
109
-     * @return Higiena int Higiena
109
+     * @return integer int Higiena
110 110
      */
111 111
     public function getHigiena()
112 112
     {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     /**
117 117
      * setHigiena
118 118
      * 
119
-     * @param int $Higiena int higiena
119
+     * @param int $higiena int higiena
120 120
      * 
121 121
      * @return PatientPED
122 122
      */
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     /**
130 130
      * getKarmienieIOdzywianie
131 131
      * 
132
-     * @return KarmienieIOdzywianie
132
+     * @return integer
133 133
      */
134 134
     public function getKarmienieIOdzywianie()
135 135
     {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     /**
140 140
      * setKarmienieIOdzywianie
141 141
      * 
142
-     * @param int $KarmienieIOdzywianie itn karmienieIOdzywianie
142
+     * @param int $karmienieIOdzywianie itn karmienieIOdzywianie
143 143
      * 
144 144
      * @return PatientPED
145 145
      */
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     /**
153 153
      * getWydalanie
154 154
      * 
155
-     * @return Wydalanie
155
+     * @return integer
156 156
      */
157 157
     public function getWydalanie()
158 158
     {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     /**
163 163
      * PatientPED
164 164
      * 
165
-     * @param int $Wydalanie Wydalanie
165
+     * @param int $wydalanie Wydalanie
166 166
      * 
167 167
      * @return PatientPED
168 168
      */
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     /**
176 176
      * getPomiarParametrowZyciowych
177 177
      * 
178
-     * @return PomiarParametrowZyciowych
178
+     * @return integer
179 179
      */
180 180
     public function getPomiarParametrowZyciowych()
181 181
     {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     /**
186 186
      * setPomiarParametrowZyciowych
187 187
      * 
188
-     * @param int $PomiarParametrowZyciowych int PomiarParametrowZyciowych
188
+     * @param int $pomiarParametrowZyciowych int PomiarParametrowZyciowych
189 189
      * 
190 190
      * @return PatientPED
191 191
      */
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     /**
199 199
      * getLeczenie
200 200
      * 
201
-     * @return Leczenie
201
+     * @return integer
202 202
      */
203 203
     public function getLeczenie()
204 204
     {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     /**
222 222
      * getEdukacjaZdrowotnaOrazWsparcieDzieckaIRodzicow
223 223
      * 
224
-     * @return EdukacjaZdrowotnaOrazWsparcieDzieckaIRodzicow
224
+     * @return integer
225 225
      */
226 226
     public function getEdukacjaZdrowotnaOrazWsparcieDzieckaIRodzicow()
227 227
     {
Please login to merge, or discard this patch.
src/Entities/PatientPOL.php 1 patch
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public $edukacjaIWsparciePsychiczne;
82 82
     //
83 83
     /**
84
-     * @return aktywnoscFizyczna
84
+     * @return integer
85 85
      */
86 86
     public function getAktywnoscFizyczna()
87 87
     {
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     /**
92 92
      * @param int $aktywnoscFizyczna int aktywnoscFizyczna
93
-     * @return PatientZZ
93
+     * @return PatientPOL
94 94
      */
95 95
     public function setAktywnoscFizyczna($aktywnoscFizyczna)
96 96
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     /**
102
-     * @return higiena
102
+     * @return integer
103 103
      */
104 104
     public function getHigiena()
105 105
     {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     /**
110 110
      * @param int $higiena int higiena
111
-     * @return PatientZZ
111
+     * @return PatientPOL
112 112
      */
113 113
     public function setHigiena($higiena)
114 114
     {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     }
118 118
 
119 119
     /**
120
-     * @return odzywianie
120
+     * @return integer
121 121
      */
122 122
     public function getOdzywianie()
123 123
     {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     /**
128 128
      * @param  int $odzywianie int odzywianie
129
-     * @return PatientZZ
129
+     * @return PatientPOL
130 130
      */
131 131
     public function setOdzywianie($odzywianie)
132 132
     {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     }
136 136
 
137 137
     /**
138
-     * @return wydalanie
138
+     * @return integer
139 139
      */
140 140
     public function getWydalanie()
141 141
     {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     /**
146 146
      * @param  int $wydalanie int wydalanie
147
-     * @return PatientZZ
147
+     * @return PatientPOL
148 148
      */
149 149
     public function setWydalanie($wydalanie)
150 150
     {
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     }
154 154
 
155 155
     /**
156
-     * @return pomiarParametrowZyciowych
156
+     * @return integer
157 157
      */
158 158
     public function getPomiarParametrowZyciowych()
159 159
     {
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
     /**
164 164
      * @param  int $pomiarParametrowZyciowych int pomiarParametrowZyciowych
165
-     * @return PatientZZ
165
+     * @return PatientPOL
166 166
      */
167 167
     public function setPomiarParametrowZyciowych($pomiarParametrowZyciowych)
168 168
     {
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     }
172 172
 
173 173
     /**
174
-     * @return leczenie
174
+     * @return integer
175 175
      */
176 176
     public function getLeczenie()
177 177
     {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
     /**
182 182
      * @param  int $leczenie int leczenie
183
-     * @return PatientZZ
183
+     * @return PatientPOL
184 184
      */
185 185
     public function setLeczenie($leczenie)
186 186
     {
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     }
190 190
 
191 191
     /**
192
-     * @return edukacjaIWsparciePsychiczne
192
+     * @return integer
193 193
      */
194 194
     public function getEdukacjaIWsparciePsychiczne()
195 195
     {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 
199 199
     /**
200 200
      * @param  int $edukacjaIWsparciePsychiczne int edukacjaIWsparciePsychiczne
201
-     * @return PatientZZ
201
+     * @return PatientPOL
202 202
      */
203 203
     public function setEdukacjaIWsparciePsychiczne($edukacjaIWsparciePsychiczne)
204 204
     {
Please login to merge, or discard this patch.
src/Entities/PatientRaport.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@
 block discarded – undo
50 50
 	 *
51 51
 	 * @param unknown $wardId        	
52 52
 	 * @param unknown $type        	
53
-	 * @param unknown $startDate        	
54
-	 * @param unknown $endDate        	
53
+	 * @param string $startDate        	
54
+	 * @param string $endDate        	
55 55
 	 * @return array
56 56
 	 */
57 57
 	public static function getRaportBetweenDates($wardId, $type, $startDate, $endDate) {
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
 	 * @param unknown $date        	
15 15
 	 */
16 16
 	public static function getRaport($wardId, $date, $wardType) {
17
-		$startDate = $date . '-01';
18
-		$endDate = date ( "Y-m-t 23:59:59", strtotime ( $startDate ) );
17
+		$startDate = $date.'-01';
18
+		$endDate = date("Y-m-t 23:59:59", strtotime($startDate));
19 19
 		
20
-		return PatientRaport::getRaportBetweenDates ( $wardId, $wardType, $startDate, $endDate );
20
+		return PatientRaport::getRaportBetweenDates($wardId, $wardType, $startDate, $endDate);
21 21
 	}
22 22
 	private static function getQuery($type) {
23 23
 		if ($type == 'POR') {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 			$dql2 .= " FROM Hospitalplugin\Entities\PatientPOR p ";
32 32
 			$dql2 .= " WHERE p.dataKategoryzacji BETWEEN ?1 AND ?2 AND p.oddzialId = ?3 AND (p.iICzas <> 3 OR p.iICzas IS NULL)";
33 33
 			$dql2 .= " GROUP BY data, p.kategoriaPacjenta";
34
-			return array (
34
+			return array(
35 35
 					$dql1,
36 36
 					$dql2 
37 37
 			);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			$dql .= " FROM Hospitalplugin\Entities\Patient p ";
42 42
 			$dql .= " WHERE p.dataKategoryzacji BETWEEN ?1 AND ?2 AND p.oddzialId = ?3";
43 43
 			$dql .= " GROUP BY data, p.kategoriaPacjenta";
44
-			return array (
44
+			return array(
45 45
 					$dql 
46 46
 			);
47 47
 		}
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
 	 * @return array
56 56
 	 */
57 57
 	public static function getRaportBetweenDates($wardId, $type, $startDate, $endDate) {
58
-		$em = DoctrineBootstrap::getEntityManager ();
59
-		$em->getConfiguration ()->addCustomDatetimeFunction ( 'DATE', 'Hospitalplugin\DQLFunctions\DateFunction' );
60
-		$dql = PatientRaport::getQuery ( $type );
61
-		$allResults = array ();
62
-		foreach ( $dql as $query ) {
63
-			$result = $em->createQuery ( $query )->setParameter ( 1, $startDate )->setParameter ( 2, $endDate )->setParameter ( 3, $wardId )->getResult ();
64
-			$allResults = array_merge ( $result, $allResults );
58
+		$em = DoctrineBootstrap::getEntityManager();
59
+		$em->getConfiguration()->addCustomDatetimeFunction('DATE', 'Hospitalplugin\DQLFunctions\DateFunction');
60
+		$dql = PatientRaport::getQuery($type);
61
+		$allResults = array();
62
+		foreach ($dql as $query) {
63
+			$result = $em->createQuery($query)->setParameter(1, $startDate)->setParameter(2, $endDate)->setParameter(3, $wardId)->getResult();
64
+			$allResults = array_merge($result, $allResults);
65 65
 		}
66 66
 		
67
-		$table = array ();
68
-		foreach ( $allResults as $row ) {
67
+		$table = array();
68
+		foreach ($allResults as $row) {
69 69
 			$table [$row ['data']] [$row ['kategoria']] = $row ['suma'];
70 70
 		}
71 71
 		return $table;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 */
76 76
 	static function getColumns($type) {
77 77
 		if ($type == 'POR') {
78
-			return array (
78
+			return array(
79 79
 					'N1 naturalny',
80 80
 					'N2 naturalny',
81 81
 					'N3 naturalny',
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 					'Tpb/dzień'
104 104
 			);
105 105
 		} else {
106
-			return array (
106
+			return array(
107 107
 					'N1',
108 108
 					'N2',
109 109
 					'N3',
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	}
126 126
 	static function getIndexes($type) {
127 127
 		if ($type == 'POR') {
128
-			return array (
128
+			return array(
129 129
 					'1',
130 130
 					'2',
131 131
 					'3',
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 					'0'
136 136
 			);
137 137
 		} else {
138
-			return array (
138
+			return array(
139 139
 					'1',
140 140
 					'2',
141 141
 					'3',
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 */
154 154
 	static function getTpb($type) {
155 155
 		if ($type == 'ZZ' || $type == 'PED') {
156
-			return array (
156
+			return array(
157 157
 					38,
158 158
 					95,
159 159
 					159,
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 					2
162 162
 			);
163 163
 		} else if ($type == 'PSY') {
164
-			return array (
164
+			return array(
165 165
 					40,
166 166
 					100,
167 167
 					160,
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 					2
170 170
 			);
171 171
 		} else if ($type == 'POR') {
172
-			return array (
172
+			return array(
173 173
 					137,
174 174
 					274,
175 175
 					328,
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 					2
181 181
 			);
182 182
 		} else if ($type == 'DIA') {
183
-			return array (
183
+			return array(
184 184
 					52,
185 185
 					112,
186 186
 					0,
187 187
 					2
188 188
 			);
189 189
 		} else if ($type == 'POL') {
190
-			return array (
190
+			return array(
191 191
 					72,
192 192
 					100,
193 193
 					98,
Please login to merge, or discard this patch.
src/Entities/PatientRaportOptimized.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
 	/**
60 60
 	 * 
61 61
 	 * @param unknown $wardId
62
-	 * @param unknown $startDate
63
-	 * @param unknown $endDate
62
+	 * @param string $startDate
63
+	 * @param string $endDate
64 64
 	 */
65 65
 	public static function getRaportBetweenDatesNative($wardId, $startDate, $endDate) {
66 66
 		$em = DoctrineBootstrap::getEntityManager ();
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 	 * @param unknown $date        	
15 15
 	 */
16 16
 	public static function getRaport($wardId, $date) {
17
-		$startDate = $date . '-01';
18
-		$endDate = date ( "Y-m-t 23:59:59", strtotime ( $startDate ) );
17
+		$startDate = $date.'-01';
18
+		$endDate = date("Y-m-t 23:59:59", strtotime($startDate));
19 19
 		
20
-		return PatientRaportOptimized::getRaportBetweenDatesNative ( $wardId, $startDate, $endDate );
20
+		return PatientRaportOptimized::getRaportBetweenDatesNative($wardId, $startDate, $endDate);
21 21
 	}
22 22
 	private static function updateNativeRaport() {
23
-		$em = DoctrineBootstrap::getEntityManager ();
24
-		$conn = $em->getConnection ();
23
+		$em = DoctrineBootstrap::getEntityManager();
24
+		$conn = $em->getConnection();
25 25
 		// create report table
26 26
 		$sql1 = "CREATE TABLE IF NOT EXISTS kategoria_view 
27 27
 					(data DATETIME, oddzialId INT, kategoria INT, suma INT,
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 					kategoriaPacjenta";
51 51
 		// select
52 52
 		try {
53
-			$conn->query ( $sql1 );
54
-			$conn->query ( $sql2 );
55
-		} catch ( Exception $e ) {
53
+			$conn->query($sql1);
54
+			$conn->query($sql2);
55
+		} catch (Exception $e) {
56 56
 			// echo 'Caught exception: ', $e->getMessage(), "\n";
57 57
 		}
58 58
 	}
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
 	 * @param unknown $endDate
64 64
 	 */
65 65
 	public static function getRaportBetweenDatesNative($wardId, $startDate, $endDate) {
66
-		$em = DoctrineBootstrap::getEntityManager ();
66
+		$em = DoctrineBootstrap::getEntityManager();
67 67
 		PatientRaportOptimized::updateNativeRaport();
68
-		$conn = $em->getConnection ();
68
+		$conn = $em->getConnection();
69 69
 		$sql3 = "SELECT kategoria, date(data) as data, suma FROM kategoria_view WHERE data between :data1 AND :data2 and oddzialId = :oddzialId";
70
-		$stmt = $conn->prepare ( $sql3 );
71
-		$stmt->execute ( array (
70
+		$stmt = $conn->prepare($sql3);
71
+		$stmt->execute(array(
72 72
 				'data1' => $startDate,
73 73
 				'data2' => $endDate,
74 74
 				'oddzialId' => $wardId 
75
-		) );
75
+		));
76 76
 		$result = $stmt->fetchAll();
77
-		$table = array ();
78
-		foreach ( $result as $row ) {
77
+		$table = array();
78
+		foreach ($result as $row) {
79 79
 			$table [$row ['data']] [$row ['kategoria']] = $row ['suma'];
80 80
 		}
81 81
 		return $table;
Please login to merge, or discard this patch.