@@ -25,14 +25,14 @@ discard block |
||
| 25 | 25 | use Punction\DB\DoctrineBootstrap; |
| 26 | 26 | |
| 27 | 27 | if (! defined ( 'ABSPATH' )) { |
| 28 | - define ( 'WP_USE_THEMES', false ); |
|
| 29 | - require ('/var/www/wp/wp-load.php'); |
|
| 28 | + define ( 'WP_USE_THEMES', false ); |
|
| 29 | + require ('/var/www/wp/wp-load.php'); |
|
| 30 | 30 | } |
| 31 | 31 | require_once ('/var/www/vendor/autoload.php'); |
| 32 | 32 | Logger::configure ( '../resources/log4php.xml' ); |
| 33 | 33 | /** |
| 34 | - * migration log4php logger |
|
| 35 | - */ |
|
| 34 | + * migration log4php logger |
|
| 35 | + */ |
|
| 36 | 36 | $log = Logger::getLogger ( "migration" ); |
| 37 | 37 | $log->info ( "Start!" ); |
| 38 | 38 | |
@@ -63,73 +63,73 @@ discard block |
||
| 63 | 63 | $entityManager = $db1->getEntityManager (); |
| 64 | 64 | |
| 65 | 65 | foreach ( $results as $result ) { |
| 66 | - /** |
|
| 67 | - */ |
|
| 68 | - $id = $result ['ID']; |
|
| 69 | - /** |
|
| 70 | - */ |
|
| 71 | - $title = $result ['post_title']; |
|
| 72 | - /** |
|
| 73 | - */ |
|
| 74 | - $pesel = implode ( get_post_meta ( $id, 'pesel' ) ); |
|
| 75 | - /** |
|
| 76 | - */ |
|
| 77 | - $oddzid = implode ( get_post_meta ( $id, 'oddzial.ID' ) ); |
|
| 78 | - /** |
|
| 79 | - */ |
|
| 66 | + /** |
|
| 67 | + */ |
|
| 68 | + $id = $result ['ID']; |
|
| 69 | + /** |
|
| 70 | + */ |
|
| 71 | + $title = $result ['post_title']; |
|
| 72 | + /** |
|
| 73 | + */ |
|
| 74 | + $pesel = implode ( get_post_meta ( $id, 'pesel' ) ); |
|
| 75 | + /** |
|
| 76 | + */ |
|
| 77 | + $oddzid = implode ( get_post_meta ( $id, 'oddzial.ID' ) ); |
|
| 78 | + /** |
|
| 79 | + */ |
|
| 80 | 80 | |
| 81 | - $numer_historii = implode ( get_post_meta ( $id, 'numer_ksiegi_glownej' ) ); |
|
| 82 | - /** |
|
| 83 | - */ |
|
| 84 | - $data_kategoryzacji = implode ( get_post_meta ( $id, 'data_kategoryzacji' ) ); |
|
| 85 | - /** |
|
| 86 | - */ |
|
| 87 | - $kategoria_pacjenta = implode ( get_post_meta ( $id, 'kategoria_pacjenta' ) ); |
|
| 88 | - /** |
|
| 89 | - */ |
|
| 90 | - $aktywnosc_fizyczna = implode ( get_post_meta ( $id, '1_aktywnosc_fizyczna' ) ); |
|
| 91 | - /** |
|
| 92 | - */ |
|
| 93 | - $higiena = implode ( get_post_meta ( $id, '2_higiena' ) ); |
|
| 94 | - /** |
|
| 95 | - */ |
|
| 96 | - $odzywianie = implode ( get_post_meta ( $id, '3_odzywianie' ) ); |
|
| 97 | - /** |
|
| 98 | - */ |
|
| 99 | - $wydalanie = implode ( get_post_meta ( $id, '4_wydalanie' ) ); |
|
| 100 | - /** |
|
| 101 | - */ |
|
| 102 | - $pomiar_objawow_zyciowych = implode ( get_post_meta ( $id, '5_pomiar_objawow_zyciowych' ) ); |
|
| 103 | - /** |
|
| 104 | - */ |
|
| 105 | - $leczenie = implode ( get_post_meta ( $id, '6_leczenie' ) ); |
|
| 106 | - /** |
|
| 107 | - */ |
|
| 108 | - $edukacja_i_wsparcie_psychiczne = implode ( get_post_meta ( $id, '7_edukacja_i_wsparcie_psychiczne' ) ); |
|
| 81 | + $numer_historii = implode ( get_post_meta ( $id, 'numer_ksiegi_glownej' ) ); |
|
| 82 | + /** |
|
| 83 | + */ |
|
| 84 | + $data_kategoryzacji = implode ( get_post_meta ( $id, 'data_kategoryzacji' ) ); |
|
| 85 | + /** |
|
| 86 | + */ |
|
| 87 | + $kategoria_pacjenta = implode ( get_post_meta ( $id, 'kategoria_pacjenta' ) ); |
|
| 88 | + /** |
|
| 89 | + */ |
|
| 90 | + $aktywnosc_fizyczna = implode ( get_post_meta ( $id, '1_aktywnosc_fizyczna' ) ); |
|
| 91 | + /** |
|
| 92 | + */ |
|
| 93 | + $higiena = implode ( get_post_meta ( $id, '2_higiena' ) ); |
|
| 94 | + /** |
|
| 95 | + */ |
|
| 96 | + $odzywianie = implode ( get_post_meta ( $id, '3_odzywianie' ) ); |
|
| 97 | + /** |
|
| 98 | + */ |
|
| 99 | + $wydalanie = implode ( get_post_meta ( $id, '4_wydalanie' ) ); |
|
| 100 | + /** |
|
| 101 | + */ |
|
| 102 | + $pomiar_objawow_zyciowych = implode ( get_post_meta ( $id, '5_pomiar_objawow_zyciowych' ) ); |
|
| 103 | + /** |
|
| 104 | + */ |
|
| 105 | + $leczenie = implode ( get_post_meta ( $id, '6_leczenie' ) ); |
|
| 106 | + /** |
|
| 107 | + */ |
|
| 108 | + $edukacja_i_wsparcie_psychiczne = implode ( get_post_meta ( $id, '7_edukacja_i_wsparcie_psychiczne' ) ); |
|
| 109 | 109 | |
| 110 | - /** |
|
| 111 | - */ |
|
| 112 | - $patient = new PatientZZ (); |
|
| 113 | - $patient->setName ( $title ); |
|
| 114 | - if ($data_kategoryzacji == null) { |
|
| 115 | - $log->warn ( "Patient " . $id . " missing date. Omitting." ); |
|
| 116 | - continue; |
|
| 117 | - } |
|
| 118 | - $patient->setDataKategoryzacji ( \DateTime::createFromFormat ( "d-m-Y", $data_kategoryzacji ) ); |
|
| 119 | - $patient->setOddzialId ( $oddzid ); |
|
| 120 | - $patient->setNumerHistorii ( $numer_historii ); |
|
| 110 | + /** |
|
| 111 | + */ |
|
| 112 | + $patient = new PatientZZ (); |
|
| 113 | + $patient->setName ( $title ); |
|
| 114 | + if ($data_kategoryzacji == null) { |
|
| 115 | + $log->warn ( "Patient " . $id . " missing date. Omitting." ); |
|
| 116 | + continue; |
|
| 117 | + } |
|
| 118 | + $patient->setDataKategoryzacji ( \DateTime::createFromFormat ( "d-m-Y", $data_kategoryzacji ) ); |
|
| 119 | + $patient->setOddzialId ( $oddzid ); |
|
| 120 | + $patient->setNumerHistorii ( $numer_historii ); |
|
| 121 | 121 | |
| 122 | - $patient->setPesel ( $pesel ); |
|
| 123 | - $patient->setKategoriaPacjenta ( $kategoria_pacjenta ); |
|
| 124 | - $patient->setAktywnoscFizyczna ( $aktywnosc_fizyczna ); |
|
| 125 | - $patient->setHigiena ( $higiena ); |
|
| 126 | - $patient->setOdzywianie ( $odzywianie ); |
|
| 127 | - $patient->setWydalanie ( $wydalanie ); |
|
| 128 | - $patient->setPomiarObjawowZyciowych ( $pomiar_objawow_zyciowych ); |
|
| 129 | - $patient->setLeczenie ( $leczenie ); |
|
| 130 | - $patient->setEdukacjaIWsparciePsychiczne ( $edukacja_i_wsparcie_psychiczne ); |
|
| 122 | + $patient->setPesel ( $pesel ); |
|
| 123 | + $patient->setKategoriaPacjenta ( $kategoria_pacjenta ); |
|
| 124 | + $patient->setAktywnoscFizyczna ( $aktywnosc_fizyczna ); |
|
| 125 | + $patient->setHigiena ( $higiena ); |
|
| 126 | + $patient->setOdzywianie ( $odzywianie ); |
|
| 127 | + $patient->setWydalanie ( $wydalanie ); |
|
| 128 | + $patient->setPomiarObjawowZyciowych ( $pomiar_objawow_zyciowych ); |
|
| 129 | + $patient->setLeczenie ( $leczenie ); |
|
| 130 | + $patient->setEdukacjaIWsparciePsychiczne ( $edukacja_i_wsparcie_psychiczne ); |
|
| 131 | 131 | |
| 132 | - $entityManager->persist ( $patient ); |
|
| 132 | + $entityManager->persist ( $patient ); |
|
| 133 | 133 | } |
| 134 | 134 | $entityManager->flush (); |
| 135 | 135 | $log->info ( "Stop!" ); |
@@ -24,17 +24,17 @@ discard block |
||
| 24 | 24 | use Hospitalplugin\Entities\PatientZZ; |
| 25 | 25 | use Punction\DB\DoctrineBootstrap; |
| 26 | 26 | |
| 27 | -if (! defined ( 'ABSPATH' )) { |
|
| 28 | - define ( 'WP_USE_THEMES', false ); |
|
| 27 | +if (!defined('ABSPATH')) { |
|
| 28 | + define('WP_USE_THEMES', false); |
|
| 29 | 29 | require ('/var/www/wp/wp-load.php'); |
| 30 | 30 | } |
| 31 | 31 | require_once ('/var/www/vendor/autoload.php'); |
| 32 | -Logger::configure ( '../resources/log4php.xml' ); |
|
| 32 | +Logger::configure('../resources/log4php.xml'); |
|
| 33 | 33 | /** |
| 34 | 34 | * migration log4php logger |
| 35 | 35 | */ |
| 36 | -$log = Logger::getLogger ( "migration" ); |
|
| 37 | -$log->info ( "Start!" ); |
|
| 36 | +$log = Logger::getLogger("migration"); |
|
| 37 | +$log->info("Start!"); |
|
| 38 | 38 | |
| 39 | 39 | global $wpdb; |
| 40 | 40 | /** |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | $error = "Error: the query failed..."; |
| 58 | 58 | /** |
| 59 | 59 | */ |
| 60 | -$results = $wpdb->get_results ( $query, ARRAY_A ) || wp_die ( $error ); |
|
| 60 | +$results = $wpdb->get_results($query, ARRAY_A) || wp_die($error); |
|
| 61 | 61 | |
| 62 | -$db1 = new DoctrineBootstrap (); |
|
| 63 | -$entityManager = $db1->getEntityManager (); |
|
| 62 | +$db1 = new DoctrineBootstrap(); |
|
| 63 | +$entityManager = $db1->getEntityManager(); |
|
| 64 | 64 | |
| 65 | -foreach ( $results as $result ) { |
|
| 65 | +foreach ($results as $result) { |
|
| 66 | 66 | /** |
| 67 | 67 | */ |
| 68 | 68 | $id = $result ['ID']; |
@@ -71,65 +71,65 @@ discard block |
||
| 71 | 71 | $title = $result ['post_title']; |
| 72 | 72 | /** |
| 73 | 73 | */ |
| 74 | - $pesel = implode ( get_post_meta ( $id, 'pesel' ) ); |
|
| 74 | + $pesel = implode(get_post_meta($id, 'pesel')); |
|
| 75 | 75 | /** |
| 76 | 76 | */ |
| 77 | - $oddzid = implode ( get_post_meta ( $id, 'oddzial.ID' ) ); |
|
| 77 | + $oddzid = implode(get_post_meta($id, 'oddzial.ID')); |
|
| 78 | 78 | /** |
| 79 | 79 | */ |
| 80 | 80 | |
| 81 | - $numer_historii = implode ( get_post_meta ( $id, 'numer_ksiegi_glownej' ) ); |
|
| 81 | + $numer_historii = implode(get_post_meta($id, 'numer_ksiegi_glownej')); |
|
| 82 | 82 | /** |
| 83 | 83 | */ |
| 84 | - $data_kategoryzacji = implode ( get_post_meta ( $id, 'data_kategoryzacji' ) ); |
|
| 84 | + $data_kategoryzacji = implode(get_post_meta($id, 'data_kategoryzacji')); |
|
| 85 | 85 | /** |
| 86 | 86 | */ |
| 87 | - $kategoria_pacjenta = implode ( get_post_meta ( $id, 'kategoria_pacjenta' ) ); |
|
| 87 | + $kategoria_pacjenta = implode(get_post_meta($id, 'kategoria_pacjenta')); |
|
| 88 | 88 | /** |
| 89 | 89 | */ |
| 90 | - $aktywnosc_fizyczna = implode ( get_post_meta ( $id, '1_aktywnosc_fizyczna' ) ); |
|
| 90 | + $aktywnosc_fizyczna = implode(get_post_meta($id, '1_aktywnosc_fizyczna')); |
|
| 91 | 91 | /** |
| 92 | 92 | */ |
| 93 | - $higiena = implode ( get_post_meta ( $id, '2_higiena' ) ); |
|
| 93 | + $higiena = implode(get_post_meta($id, '2_higiena')); |
|
| 94 | 94 | /** |
| 95 | 95 | */ |
| 96 | - $odzywianie = implode ( get_post_meta ( $id, '3_odzywianie' ) ); |
|
| 96 | + $odzywianie = implode(get_post_meta($id, '3_odzywianie')); |
|
| 97 | 97 | /** |
| 98 | 98 | */ |
| 99 | - $wydalanie = implode ( get_post_meta ( $id, '4_wydalanie' ) ); |
|
| 99 | + $wydalanie = implode(get_post_meta($id, '4_wydalanie')); |
|
| 100 | 100 | /** |
| 101 | 101 | */ |
| 102 | - $pomiar_objawow_zyciowych = implode ( get_post_meta ( $id, '5_pomiar_objawow_zyciowych' ) ); |
|
| 102 | + $pomiar_objawow_zyciowych = implode(get_post_meta($id, '5_pomiar_objawow_zyciowych')); |
|
| 103 | 103 | /** |
| 104 | 104 | */ |
| 105 | - $leczenie = implode ( get_post_meta ( $id, '6_leczenie' ) ); |
|
| 105 | + $leczenie = implode(get_post_meta($id, '6_leczenie')); |
|
| 106 | 106 | /** |
| 107 | 107 | */ |
| 108 | - $edukacja_i_wsparcie_psychiczne = implode ( get_post_meta ( $id, '7_edukacja_i_wsparcie_psychiczne' ) ); |
|
| 108 | + $edukacja_i_wsparcie_psychiczne = implode(get_post_meta($id, '7_edukacja_i_wsparcie_psychiczne')); |
|
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | 111 | */ |
| 112 | - $patient = new PatientZZ (); |
|
| 113 | - $patient->setName ( $title ); |
|
| 112 | + $patient = new PatientZZ(); |
|
| 113 | + $patient->setName($title); |
|
| 114 | 114 | if ($data_kategoryzacji == null) { |
| 115 | - $log->warn ( "Patient " . $id . " missing date. Omitting." ); |
|
| 115 | + $log->warn("Patient ".$id." missing date. Omitting."); |
|
| 116 | 116 | continue; |
| 117 | 117 | } |
| 118 | - $patient->setDataKategoryzacji ( \DateTime::createFromFormat ( "d-m-Y", $data_kategoryzacji ) ); |
|
| 119 | - $patient->setOddzialId ( $oddzid ); |
|
| 120 | - $patient->setNumerHistorii ( $numer_historii ); |
|
| 118 | + $patient->setDataKategoryzacji(\DateTime::createFromFormat("d-m-Y", $data_kategoryzacji)); |
|
| 119 | + $patient->setOddzialId($oddzid); |
|
| 120 | + $patient->setNumerHistorii($numer_historii); |
|
| 121 | 121 | |
| 122 | - $patient->setPesel ( $pesel ); |
|
| 123 | - $patient->setKategoriaPacjenta ( $kategoria_pacjenta ); |
|
| 124 | - $patient->setAktywnoscFizyczna ( $aktywnosc_fizyczna ); |
|
| 125 | - $patient->setHigiena ( $higiena ); |
|
| 126 | - $patient->setOdzywianie ( $odzywianie ); |
|
| 127 | - $patient->setWydalanie ( $wydalanie ); |
|
| 128 | - $patient->setPomiarObjawowZyciowych ( $pomiar_objawow_zyciowych ); |
|
| 129 | - $patient->setLeczenie ( $leczenie ); |
|
| 130 | - $patient->setEdukacjaIWsparciePsychiczne ( $edukacja_i_wsparcie_psychiczne ); |
|
| 122 | + $patient->setPesel($pesel); |
|
| 123 | + $patient->setKategoriaPacjenta($kategoria_pacjenta); |
|
| 124 | + $patient->setAktywnoscFizyczna($aktywnosc_fizyczna); |
|
| 125 | + $patient->setHigiena($higiena); |
|
| 126 | + $patient->setOdzywianie($odzywianie); |
|
| 127 | + $patient->setWydalanie($wydalanie); |
|
| 128 | + $patient->setPomiarObjawowZyciowych($pomiar_objawow_zyciowych); |
|
| 129 | + $patient->setLeczenie($leczenie); |
|
| 130 | + $patient->setEdukacjaIWsparciePsychiczne($edukacja_i_wsparcie_psychiczne); |
|
| 131 | 131 | |
| 132 | - $entityManager->persist ( $patient ); |
|
| 132 | + $entityManager->persist($patient); |
|
| 133 | 133 | } |
| 134 | -$entityManager->flush (); |
|
| 135 | -$log->info ( "Stop!" ); |
|
| 134 | +$entityManager->flush(); |
|
| 135 | +$log->info("Stop!"); |
|
@@ -31,30 +31,30 @@ |
||
| 31 | 31 | use Hospitalplugin\Twig\PLTwig; |
| 32 | 32 | |
| 33 | 33 | class HospitalForm { |
| 34 | - public static function load($yaml, $class, $dir) { |
|
| 35 | - try { |
|
| 36 | - $em = DoctrineBootstrap::getEntityManager (); |
|
| 34 | + public static function load($yaml, $class, $dir) { |
|
| 35 | + try { |
|
| 36 | + $em = DoctrineBootstrap::getEntityManager (); |
|
| 37 | 37 | |
| 38 | - $userId = $userId = wp_get_current_user ()->ID; |
|
| 39 | - $ward = WardCRUD::getWardForUser ( $userId ); |
|
| 40 | - $user = $em->find ( "\Hospitalplugin\Entities\User", $userId ); |
|
| 38 | + $userId = $userId = wp_get_current_user ()->ID; |
|
| 39 | + $ward = WardCRUD::getWardForUser ( $userId ); |
|
| 40 | + $user = $em->find ( "\Hospitalplugin\Entities\User", $userId ); |
|
| 41 | 41 | |
| 42 | - if (! empty ( $_POST )) { |
|
| 43 | - $args = $_POST; |
|
| 44 | - $i = new $class ( $args ); |
|
| 45 | - $i->setWard ( $ward ); |
|
| 46 | - $i->setUser ( $user ); |
|
| 47 | - $em->persist ( $i ); |
|
| 48 | - $em->flush (); |
|
| 49 | - } else { |
|
| 50 | - $object = \Hospitalplugin\utils\YAML2Object::getObject ( $yaml ); |
|
| 51 | - echo PLTwig::load ( $dir )->render ( 'form.twig', array ( |
|
| 52 | - 'infections' => $object |
|
| 53 | - ) ); |
|
| 54 | - } |
|
| 55 | - } catch ( Exception $e ) { |
|
| 56 | - echo "ERR: " . $e; |
|
| 57 | - } |
|
| 58 | - } |
|
| 42 | + if (! empty ( $_POST )) { |
|
| 43 | + $args = $_POST; |
|
| 44 | + $i = new $class ( $args ); |
|
| 45 | + $i->setWard ( $ward ); |
|
| 46 | + $i->setUser ( $user ); |
|
| 47 | + $em->persist ( $i ); |
|
| 48 | + $em->flush (); |
|
| 49 | + } else { |
|
| 50 | + $object = \Hospitalplugin\utils\YAML2Object::getObject ( $yaml ); |
|
| 51 | + echo PLTwig::load ( $dir )->render ( 'form.twig', array ( |
|
| 52 | + 'infections' => $object |
|
| 53 | + ) ); |
|
| 54 | + } |
|
| 55 | + } catch ( Exception $e ) { |
|
| 56 | + echo "ERR: " . $e; |
|
| 57 | + } |
|
| 58 | + } |
|
| 59 | 59 | } |
| 60 | 60 | ?> |
| 61 | 61 | \ No newline at end of file |
@@ -33,27 +33,27 @@ |
||
| 33 | 33 | class HospitalForm { |
| 34 | 34 | public static function load($yaml, $class, $dir) { |
| 35 | 35 | try { |
| 36 | - $em = DoctrineBootstrap::getEntityManager (); |
|
| 36 | + $em = DoctrineBootstrap::getEntityManager(); |
|
| 37 | 37 | |
| 38 | - $userId = $userId = wp_get_current_user ()->ID; |
|
| 39 | - $ward = WardCRUD::getWardForUser ( $userId ); |
|
| 40 | - $user = $em->find ( "\Hospitalplugin\Entities\User", $userId ); |
|
| 38 | + $userId = $userId = wp_get_current_user()->ID; |
|
| 39 | + $ward = WardCRUD::getWardForUser($userId); |
|
| 40 | + $user = $em->find("\Hospitalplugin\Entities\User", $userId); |
|
| 41 | 41 | |
| 42 | - if (! empty ( $_POST )) { |
|
| 42 | + if (!empty ($_POST)) { |
|
| 43 | 43 | $args = $_POST; |
| 44 | - $i = new $class ( $args ); |
|
| 45 | - $i->setWard ( $ward ); |
|
| 46 | - $i->setUser ( $user ); |
|
| 47 | - $em->persist ( $i ); |
|
| 48 | - $em->flush (); |
|
| 44 | + $i = new $class($args); |
|
| 45 | + $i->setWard($ward); |
|
| 46 | + $i->setUser($user); |
|
| 47 | + $em->persist($i); |
|
| 48 | + $em->flush(); |
|
| 49 | 49 | } else { |
| 50 | - $object = \Hospitalplugin\utils\YAML2Object::getObject ( $yaml ); |
|
| 51 | - echo PLTwig::load ( $dir )->render ( 'form.twig', array ( |
|
| 50 | + $object = \Hospitalplugin\utils\YAML2Object::getObject($yaml); |
|
| 51 | + echo PLTwig::load($dir)->render('form.twig', array( |
|
| 52 | 52 | 'infections' => $object |
| 53 | - ) ); |
|
| 53 | + )); |
|
| 54 | 54 | } |
| 55 | - } catch ( Exception $e ) { |
|
| 56 | - echo "ERR: " . $e; |
|
| 55 | + } catch (Exception $e) { |
|
| 56 | + echo "ERR: ".$e; |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -39,116 +39,116 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | class InfectionRaport { |
| 41 | 41 | |
| 42 | - /** |
|
| 43 | - * id |
|
| 44 | - * @Id @Column(type="integer") @GeneratedValue |
|
| 45 | - */ |
|
| 46 | - public $id; |
|
| 42 | + /** |
|
| 43 | + * id |
|
| 44 | + * @Id @Column(type="integer") @GeneratedValue |
|
| 45 | + */ |
|
| 46 | + public $id; |
|
| 47 | 47 | |
| 48 | - /** |
|
| 49 | - * $dataRaportu datetime |
|
| 50 | - * @Column(type="datetime") * |
|
| 51 | - */ |
|
| 52 | - public $dataRaportu; |
|
| 48 | + /** |
|
| 49 | + * $dataRaportu datetime |
|
| 50 | + * @Column(type="datetime") * |
|
| 51 | + */ |
|
| 52 | + public $dataRaportu; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * $dataPrzeslania datetime |
|
| 56 | - * @Column(type="datetime") * |
|
| 57 | - */ |
|
| 58 | - public $dataPrzeslania; |
|
| 54 | + /** |
|
| 55 | + * $dataPrzeslania datetime |
|
| 56 | + * @Column(type="datetime") * |
|
| 57 | + */ |
|
| 58 | + public $dataPrzeslania; |
|
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * @ManyToOne(targetEntity="Hospitalplugin\Entities\Ward") |
|
| 62 | - * @JoinColumn(name="oddzialId", referencedColumnName="id") |
|
| 63 | - */ |
|
| 64 | - public $ward; |
|
| 60 | + /** |
|
| 61 | + * @ManyToOne(targetEntity="Hospitalplugin\Entities\Ward") |
|
| 62 | + * @JoinColumn(name="oddzialId", referencedColumnName="id") |
|
| 63 | + */ |
|
| 64 | + public $ward; |
|
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * @ManyToOne(targetEntity="Hospitalplugin\Entities\User") |
|
| 68 | - * @JoinColumn(name="userId", referencedColumnName="id") |
|
| 69 | - */ |
|
| 70 | - protected $user; |
|
| 66 | + /** |
|
| 67 | + * @ManyToOne(targetEntity="Hospitalplugin\Entities\User") |
|
| 68 | + * @JoinColumn(name="userId", referencedColumnName="id") |
|
| 69 | + */ |
|
| 70 | + protected $user; |
|
| 71 | 71 | |
| 72 | - function __construct($args) { |
|
| 73 | - foreach ( $args as $key => $value ) { |
|
| 74 | - if ($key == 'dataRaportu') { |
|
| 75 | - $value = new \DateTime ( $value ); |
|
| 76 | - } |
|
| 77 | - call_user_func ( array ( |
|
| 78 | - $this, |
|
| 79 | - 'set' . $key |
|
| 80 | - ), $value ); |
|
| 81 | - } |
|
| 82 | - $this->dataPrzeslania = new \DateTime (); |
|
| 83 | - echo '<h3><div class="alert alert-primary">Dziękuję za przesłanie raportu!</div></h3>'; |
|
| 84 | - } |
|
| 72 | + function __construct($args) { |
|
| 73 | + foreach ( $args as $key => $value ) { |
|
| 74 | + if ($key == 'dataRaportu') { |
|
| 75 | + $value = new \DateTime ( $value ); |
|
| 76 | + } |
|
| 77 | + call_user_func ( array ( |
|
| 78 | + $this, |
|
| 79 | + 'set' . $key |
|
| 80 | + ), $value ); |
|
| 81 | + } |
|
| 82 | + $this->dataPrzeslania = new \DateTime (); |
|
| 83 | + echo '<h3><div class="alert alert-primary">Dziękuję za przesłanie raportu!</div></h3>'; |
|
| 84 | + } |
|
| 85 | 85 | |
| 86 | - /** |
|
| 87 | - * getId |
|
| 88 | - * |
|
| 89 | - * @return id |
|
| 90 | - */ |
|
| 91 | - public function getId() { |
|
| 92 | - return $this->id; |
|
| 93 | - } |
|
| 86 | + /** |
|
| 87 | + * getId |
|
| 88 | + * |
|
| 89 | + * @return id |
|
| 90 | + */ |
|
| 91 | + public function getId() { |
|
| 92 | + return $this->id; |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - /** |
|
| 96 | - * sets id |
|
| 97 | - * |
|
| 98 | - * @param int $id |
|
| 99 | - * ID |
|
| 100 | - * |
|
| 101 | - * @return \Hospitalplugin\Entities\Patient |
|
| 102 | - */ |
|
| 103 | - public function setId($id) { |
|
| 104 | - $this->id = $id; |
|
| 105 | - return $this; |
|
| 106 | - } |
|
| 95 | + /** |
|
| 96 | + * sets id |
|
| 97 | + * |
|
| 98 | + * @param int $id |
|
| 99 | + * ID |
|
| 100 | + * |
|
| 101 | + * @return \Hospitalplugin\Entities\Patient |
|
| 102 | + */ |
|
| 103 | + public function setId($id) { |
|
| 104 | + $this->id = $id; |
|
| 105 | + return $this; |
|
| 106 | + } |
|
| 107 | 107 | |
| 108 | - /** |
|
| 109 | - * toString |
|
| 110 | - * |
|
| 111 | - * @return string |
|
| 112 | - */ |
|
| 113 | - public function toString() { |
|
| 114 | - $txt = $this->getId (); |
|
| 115 | - $data = $this->getDataRaportu (); |
|
| 116 | - if ($data instanceof \DateTime) { |
|
| 117 | - $txt .= $this->getDataRaportu ()->format ( "Y-m-d" ); |
|
| 118 | - } else { |
|
| 119 | - $txt .= $this->getDataRaportu (); |
|
| 120 | - } |
|
| 121 | - return $txt; |
|
| 122 | - } |
|
| 123 | - public function getDataRaportu() { |
|
| 124 | - return $this->dataRaportu; |
|
| 125 | - } |
|
| 126 | - public function setDataRaportu($dataRaportu) { |
|
| 127 | - $this->dataRaportu = $dataRaportu; |
|
| 128 | - return $this; |
|
| 129 | - } |
|
| 108 | + /** |
|
| 109 | + * toString |
|
| 110 | + * |
|
| 111 | + * @return string |
|
| 112 | + */ |
|
| 113 | + public function toString() { |
|
| 114 | + $txt = $this->getId (); |
|
| 115 | + $data = $this->getDataRaportu (); |
|
| 116 | + if ($data instanceof \DateTime) { |
|
| 117 | + $txt .= $this->getDataRaportu ()->format ( "Y-m-d" ); |
|
| 118 | + } else { |
|
| 119 | + $txt .= $this->getDataRaportu (); |
|
| 120 | + } |
|
| 121 | + return $txt; |
|
| 122 | + } |
|
| 123 | + public function getDataRaportu() { |
|
| 124 | + return $this->dataRaportu; |
|
| 125 | + } |
|
| 126 | + public function setDataRaportu($dataRaportu) { |
|
| 127 | + $this->dataRaportu = $dataRaportu; |
|
| 128 | + return $this; |
|
| 129 | + } |
|
| 130 | 130 | |
| 131 | - public function getDataPrzeslania() { |
|
| 132 | - return $this->dataPrzeslania; |
|
| 133 | - } |
|
| 134 | - public function setDataPrzeslania($dataPrzeslania) { |
|
| 135 | - $this->dataPrzeslania = $dataPrzeslania; |
|
| 136 | - return $this; |
|
| 137 | - } |
|
| 138 | - public function getWard() { |
|
| 139 | - return $this->ward; |
|
| 140 | - } |
|
| 141 | - public function setWard($ward) { |
|
| 142 | - $this->ward = $ward; |
|
| 143 | - return $this; |
|
| 144 | - } |
|
| 145 | - public function getUser() { |
|
| 146 | - return $this->user; |
|
| 147 | - } |
|
| 148 | - public function setUser($user) { |
|
| 149 | - $this->user = $user; |
|
| 150 | - return $this; |
|
| 151 | - } |
|
| 131 | + public function getDataPrzeslania() { |
|
| 132 | + return $this->dataPrzeslania; |
|
| 133 | + } |
|
| 134 | + public function setDataPrzeslania($dataPrzeslania) { |
|
| 135 | + $this->dataPrzeslania = $dataPrzeslania; |
|
| 136 | + return $this; |
|
| 137 | + } |
|
| 138 | + public function getWard() { |
|
| 139 | + return $this->ward; |
|
| 140 | + } |
|
| 141 | + public function setWard($ward) { |
|
| 142 | + $this->ward = $ward; |
|
| 143 | + return $this; |
|
| 144 | + } |
|
| 145 | + public function getUser() { |
|
| 146 | + return $this->user; |
|
| 147 | + } |
|
| 148 | + public function setUser($user) { |
|
| 149 | + $this->user = $user; |
|
| 150 | + return $this; |
|
| 151 | + } |
|
| 152 | 152 | |
| 153 | 153 | |
| 154 | 154 | } |
@@ -70,16 +70,16 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -46,228 +46,228 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | class Infections extends InfectionRaport { |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 51 | - */ |
|
| 52 | - public $G; |
|
| 49 | + /** |
|
| 50 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 51 | + */ |
|
| 52 | + public $G; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 56 | - */ |
|
| 57 | - public $A; |
|
| 54 | + /** |
|
| 55 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 56 | + */ |
|
| 57 | + public $A; |
|
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 61 | - */ |
|
| 62 | - public $B; |
|
| 59 | + /** |
|
| 60 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 61 | + */ |
|
| 62 | + public $B; |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 66 | - */ |
|
| 67 | - public $Bzak; |
|
| 64 | + /** |
|
| 65 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 66 | + */ |
|
| 67 | + public $Bzak; |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 71 | - */ |
|
| 72 | - public $ZMO; |
|
| 69 | + /** |
|
| 70 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 71 | + */ |
|
| 72 | + public $ZMO; |
|
| 73 | 73 | |
| 74 | - /** |
|
| 75 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 76 | - */ |
|
| 77 | - public $ZUM; |
|
| 74 | + /** |
|
| 75 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 76 | + */ |
|
| 77 | + public $ZUM; |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 81 | - */ |
|
| 82 | - public $PNEUVAP; |
|
| 79 | + /** |
|
| 80 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 81 | + */ |
|
| 82 | + public $PNEUVAP; |
|
| 83 | 83 | |
| 84 | - /** |
|
| 85 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 86 | - */ |
|
| 87 | - public $ZODC; |
|
| 84 | + /** |
|
| 85 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 86 | + */ |
|
| 87 | + public $ZODC; |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 91 | - */ |
|
| 92 | - public $ZKR; |
|
| 89 | + /** |
|
| 90 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 91 | + */ |
|
| 92 | + public $ZKR; |
|
| 93 | 93 | |
| 94 | - /** |
|
| 95 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 96 | - */ |
|
| 97 | - public $ROZIII; |
|
| 94 | + /** |
|
| 95 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 96 | + */ |
|
| 97 | + public $ROZIII; |
|
| 98 | 98 | |
| 99 | - /** |
|
| 100 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 101 | - */ |
|
| 102 | - public $ROZII; |
|
| 99 | + /** |
|
| 100 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 101 | + */ |
|
| 102 | + public $ROZII; |
|
| 103 | 103 | |
| 104 | - /** |
|
| 105 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 106 | - */ |
|
| 107 | - public $OIOM; |
|
| 104 | + /** |
|
| 105 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 106 | + */ |
|
| 107 | + public $OIOM; |
|
| 108 | 108 | |
| 109 | - /** |
|
| 110 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 111 | - */ |
|
| 112 | - public $BM; |
|
| 109 | + /** |
|
| 110 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 111 | + */ |
|
| 112 | + public $BM; |
|
| 113 | 113 | |
| 114 | - /** |
|
| 115 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 116 | - */ |
|
| 117 | - public $IZOL; |
|
| 114 | + /** |
|
| 115 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 116 | + */ |
|
| 117 | + public $IZOL; |
|
| 118 | 118 | |
| 119 | - /** |
|
| 120 | - * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 121 | - */ |
|
| 122 | - public $ZAK; |
|
| 119 | + /** |
|
| 120 | + * @Column(columnDefinition="SMALLINT NOT NULL DEFAULT 0") * |
|
| 121 | + */ |
|
| 122 | + public $ZAK; |
|
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * @Column(type="string", length=1000) |
|
| 126 | - */ |
|
| 127 | - public $Uwagi; |
|
| 124 | + /** |
|
| 125 | + * @Column(type="string", length=1000) |
|
| 126 | + */ |
|
| 127 | + public $Uwagi; |
|
| 128 | 128 | |
| 129 | - /** |
|
| 130 | - * @Column(type="string", length=1000) |
|
| 131 | - */ |
|
| 132 | - public $Weryfikacja = ""; |
|
| 133 | - public function getG() { |
|
| 134 | - return $this->G; |
|
| 135 | - } |
|
| 136 | - public function setG($G) { |
|
| 137 | - $this->G = $G; |
|
| 138 | - return $this; |
|
| 139 | - } |
|
| 140 | - public function getA() { |
|
| 141 | - return $this->A; |
|
| 142 | - } |
|
| 143 | - public function setA($A) { |
|
| 144 | - $this->A = $A; |
|
| 145 | - return $this; |
|
| 146 | - } |
|
| 147 | - public function getB() { |
|
| 148 | - return $this->B; |
|
| 149 | - } |
|
| 150 | - public function setB($B) { |
|
| 151 | - $this->B = $B; |
|
| 152 | - return $this; |
|
| 153 | - } |
|
| 154 | - public function getBzak() { |
|
| 155 | - return $this->Bzak; |
|
| 156 | - } |
|
| 157 | - public function setBzak($Bzak) { |
|
| 158 | - $this->Bzak = $Bzak; |
|
| 159 | - return $this; |
|
| 160 | - } |
|
| 161 | - public function getZMO() { |
|
| 162 | - return $this->ZMO; |
|
| 163 | - } |
|
| 164 | - public function setZMO($ZMO) { |
|
| 165 | - $this->ZMO = $ZMO; |
|
| 166 | - return $this; |
|
| 167 | - } |
|
| 168 | - public function getZUM() { |
|
| 169 | - return $this->ZUM; |
|
| 170 | - } |
|
| 171 | - public function setZUM($ZUM) { |
|
| 172 | - $this->ZUM = $ZUM; |
|
| 173 | - return $this; |
|
| 174 | - } |
|
| 175 | - public function getPNEUVAP() { |
|
| 176 | - return $this->PNEUVAP; |
|
| 177 | - } |
|
| 178 | - public function setPNEUVAP($PNEUVAP) { |
|
| 179 | - $this->PNEUVAP = $PNEUVAP; |
|
| 180 | - return $this; |
|
| 181 | - } |
|
| 182 | - public function getZODC() { |
|
| 183 | - return $this->ZODC; |
|
| 184 | - } |
|
| 185 | - public function setZODC($ZODC) { |
|
| 186 | - $this->ZODC = $ZODC; |
|
| 187 | - return $this; |
|
| 188 | - } |
|
| 189 | - public function getZKR() { |
|
| 190 | - return $this->ZKR; |
|
| 191 | - } |
|
| 192 | - public function setZKR($ZKR) { |
|
| 193 | - $this->ZKR = $ZKR; |
|
| 194 | - return $this; |
|
| 195 | - } |
|
| 196 | - public function getOIOM() { |
|
| 197 | - return $this->OIOM; |
|
| 198 | - } |
|
| 199 | - public function setOIOM($OIOM) { |
|
| 200 | - $this->OIOM = $OIOM; |
|
| 201 | - return $this; |
|
| 202 | - } |
|
| 203 | - public function getBM() { |
|
| 204 | - return $this->BM; |
|
| 205 | - } |
|
| 206 | - public function setBM($BM) { |
|
| 207 | - $this->BM = $BM; |
|
| 208 | - return $this; |
|
| 209 | - } |
|
| 210 | - public function getIZOL() { |
|
| 211 | - return $this->IZOL; |
|
| 212 | - } |
|
| 213 | - public function setIZOL($IZOL) { |
|
| 214 | - $this->IZOL = $IZOL; |
|
| 215 | - return $this; |
|
| 216 | - } |
|
| 217 | - public function getZAK() { |
|
| 218 | - return $this->ZAK; |
|
| 219 | - } |
|
| 220 | - public function setZAK($ZAK) { |
|
| 221 | - $this->ZAK = $ZAK; |
|
| 222 | - return $this; |
|
| 223 | - } |
|
| 224 | - public function getROZIII() { |
|
| 225 | - return $this->ROZIII; |
|
| 226 | - } |
|
| 227 | - public function setROZIII($ROZIII) { |
|
| 228 | - $this->ROZIII = $ROZIII; |
|
| 229 | - return $this; |
|
| 230 | - } |
|
| 231 | - public function getROZII() { |
|
| 232 | - return $this->ROZII; |
|
| 233 | - } |
|
| 234 | - public function setROZII($ROZII) { |
|
| 235 | - $this->ROZII = $ROZII; |
|
| 236 | - return $this; |
|
| 237 | - } |
|
| 238 | - public function getUwagi() { |
|
| 239 | - return $this->Uwagi; |
|
| 240 | - } |
|
| 241 | - public function setUwagi($Uwagi) { |
|
| 242 | - $this->Uwagi = $Uwagi; |
|
| 243 | - return $this; |
|
| 244 | - } |
|
| 245 | - public function getWeryfikacja() { |
|
| 246 | - return $this->Weryfikacja; |
|
| 247 | - } |
|
| 248 | - public function setWeryfikacja($Weryfikacja) { |
|
| 249 | - $this->Weryfikacja = $Weryfikacja; |
|
| 250 | - return $this; |
|
| 251 | - } |
|
| 252 | - public static function getFields() { |
|
| 253 | - return array ( |
|
| 254 | - "Data raportu" => "dataRaportu", |
|
| 255 | - "Oddział" => "ward", |
|
| 256 | - "G" => "G", |
|
| 257 | - "A" => "A", |
|
| 258 | - "B" => "B", |
|
| 259 | - "Bzak" => "Bzak", |
|
| 260 | - "ZMO" => "ZMO", |
|
| 261 | - "ZUM" => "ZUM", |
|
| 262 | - "PNEU-VAP" => "PNEUVAP", |
|
| 263 | - "ZODC" => "ZODC", |
|
| 264 | - "ZKR" => "ZKR", |
|
| 265 | - "ROZ-III" => "ROZIII", |
|
| 266 | - "ROZ-II" => "ROZII", |
|
| 267 | - "OIOM" => "OIOM", |
|
| 268 | - "BM" => "BM", |
|
| 269 | - "IZOL" => "IZOL", |
|
| 270 | - "ZAK" => "ZAK" |
|
| 271 | - ); |
|
| 272 | - } |
|
| 129 | + /** |
|
| 130 | + * @Column(type="string", length=1000) |
|
| 131 | + */ |
|
| 132 | + public $Weryfikacja = ""; |
|
| 133 | + public function getG() { |
|
| 134 | + return $this->G; |
|
| 135 | + } |
|
| 136 | + public function setG($G) { |
|
| 137 | + $this->G = $G; |
|
| 138 | + return $this; |
|
| 139 | + } |
|
| 140 | + public function getA() { |
|
| 141 | + return $this->A; |
|
| 142 | + } |
|
| 143 | + public function setA($A) { |
|
| 144 | + $this->A = $A; |
|
| 145 | + return $this; |
|
| 146 | + } |
|
| 147 | + public function getB() { |
|
| 148 | + return $this->B; |
|
| 149 | + } |
|
| 150 | + public function setB($B) { |
|
| 151 | + $this->B = $B; |
|
| 152 | + return $this; |
|
| 153 | + } |
|
| 154 | + public function getBzak() { |
|
| 155 | + return $this->Bzak; |
|
| 156 | + } |
|
| 157 | + public function setBzak($Bzak) { |
|
| 158 | + $this->Bzak = $Bzak; |
|
| 159 | + return $this; |
|
| 160 | + } |
|
| 161 | + public function getZMO() { |
|
| 162 | + return $this->ZMO; |
|
| 163 | + } |
|
| 164 | + public function setZMO($ZMO) { |
|
| 165 | + $this->ZMO = $ZMO; |
|
| 166 | + return $this; |
|
| 167 | + } |
|
| 168 | + public function getZUM() { |
|
| 169 | + return $this->ZUM; |
|
| 170 | + } |
|
| 171 | + public function setZUM($ZUM) { |
|
| 172 | + $this->ZUM = $ZUM; |
|
| 173 | + return $this; |
|
| 174 | + } |
|
| 175 | + public function getPNEUVAP() { |
|
| 176 | + return $this->PNEUVAP; |
|
| 177 | + } |
|
| 178 | + public function setPNEUVAP($PNEUVAP) { |
|
| 179 | + $this->PNEUVAP = $PNEUVAP; |
|
| 180 | + return $this; |
|
| 181 | + } |
|
| 182 | + public function getZODC() { |
|
| 183 | + return $this->ZODC; |
|
| 184 | + } |
|
| 185 | + public function setZODC($ZODC) { |
|
| 186 | + $this->ZODC = $ZODC; |
|
| 187 | + return $this; |
|
| 188 | + } |
|
| 189 | + public function getZKR() { |
|
| 190 | + return $this->ZKR; |
|
| 191 | + } |
|
| 192 | + public function setZKR($ZKR) { |
|
| 193 | + $this->ZKR = $ZKR; |
|
| 194 | + return $this; |
|
| 195 | + } |
|
| 196 | + public function getOIOM() { |
|
| 197 | + return $this->OIOM; |
|
| 198 | + } |
|
| 199 | + public function setOIOM($OIOM) { |
|
| 200 | + $this->OIOM = $OIOM; |
|
| 201 | + return $this; |
|
| 202 | + } |
|
| 203 | + public function getBM() { |
|
| 204 | + return $this->BM; |
|
| 205 | + } |
|
| 206 | + public function setBM($BM) { |
|
| 207 | + $this->BM = $BM; |
|
| 208 | + return $this; |
|
| 209 | + } |
|
| 210 | + public function getIZOL() { |
|
| 211 | + return $this->IZOL; |
|
| 212 | + } |
|
| 213 | + public function setIZOL($IZOL) { |
|
| 214 | + $this->IZOL = $IZOL; |
|
| 215 | + return $this; |
|
| 216 | + } |
|
| 217 | + public function getZAK() { |
|
| 218 | + return $this->ZAK; |
|
| 219 | + } |
|
| 220 | + public function setZAK($ZAK) { |
|
| 221 | + $this->ZAK = $ZAK; |
|
| 222 | + return $this; |
|
| 223 | + } |
|
| 224 | + public function getROZIII() { |
|
| 225 | + return $this->ROZIII; |
|
| 226 | + } |
|
| 227 | + public function setROZIII($ROZIII) { |
|
| 228 | + $this->ROZIII = $ROZIII; |
|
| 229 | + return $this; |
|
| 230 | + } |
|
| 231 | + public function getROZII() { |
|
| 232 | + return $this->ROZII; |
|
| 233 | + } |
|
| 234 | + public function setROZII($ROZII) { |
|
| 235 | + $this->ROZII = $ROZII; |
|
| 236 | + return $this; |
|
| 237 | + } |
|
| 238 | + public function getUwagi() { |
|
| 239 | + return $this->Uwagi; |
|
| 240 | + } |
|
| 241 | + public function setUwagi($Uwagi) { |
|
| 242 | + $this->Uwagi = $Uwagi; |
|
| 243 | + return $this; |
|
| 244 | + } |
|
| 245 | + public function getWeryfikacja() { |
|
| 246 | + return $this->Weryfikacja; |
|
| 247 | + } |
|
| 248 | + public function setWeryfikacja($Weryfikacja) { |
|
| 249 | + $this->Weryfikacja = $Weryfikacja; |
|
| 250 | + return $this; |
|
| 251 | + } |
|
| 252 | + public static function getFields() { |
|
| 253 | + return array ( |
|
| 254 | + "Data raportu" => "dataRaportu", |
|
| 255 | + "Oddział" => "ward", |
|
| 256 | + "G" => "G", |
|
| 257 | + "A" => "A", |
|
| 258 | + "B" => "B", |
|
| 259 | + "Bzak" => "Bzak", |
|
| 260 | + "ZMO" => "ZMO", |
|
| 261 | + "ZUM" => "ZUM", |
|
| 262 | + "PNEU-VAP" => "PNEUVAP", |
|
| 263 | + "ZODC" => "ZODC", |
|
| 264 | + "ZKR" => "ZKR", |
|
| 265 | + "ROZ-III" => "ROZIII", |
|
| 266 | + "ROZ-II" => "ROZII", |
|
| 267 | + "OIOM" => "OIOM", |
|
| 268 | + "BM" => "BM", |
|
| 269 | + "IZOL" => "IZOL", |
|
| 270 | + "ZAK" => "ZAK" |
|
| 271 | + ); |
|
| 272 | + } |
|
| 273 | 273 | } |
@@ -250,7 +250,7 @@ |
||
| 250 | 250 | return $this; |
| 251 | 251 | } |
| 252 | 252 | public static function getFields() { |
| 253 | - return array ( |
|
| 253 | + return array( |
|
| 254 | 254 | "Data raportu" => "dataRaportu", |
| 255 | 255 | "Oddział" => "ward", |
| 256 | 256 | "G" => "G", |
@@ -28,44 +28,44 @@ |
||
| 28 | 28 | use Hospitalplugin\utils\Utils; |
| 29 | 29 | |
| 30 | 30 | class InfectionsCRUD { |
| 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' ) /* */ |
|
| 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 | 35 | ->addOrderBy ( 'i.dataRaportu', 'DESC' ) /* */ |
| 36 | 36 | ->addOrderBy ( 'i.dataPrzeslania ', 'DESC' ) /* */ |
| 37 | 37 | ->where ( /* */ |
| 38 | - $qb->expr ()->between ( 'i.dataRaportu', ':from', ':to' ) ) /* */ |
|
| 39 | - ->setParameters ( array ( |
|
| 40 | - 'from' => $from, |
|
| 41 | - 'to' => $to |
|
| 42 | - ) ); |
|
| 43 | - if ($wardId != 'all') { |
|
| 44 | - $qb->andWhere ( $qb->expr ()->eq ( 'i.ward', ':ward' ) ) /* */ |
|
| 45 | - ->setParameter ( 'ward', $wardId ); |
|
| 46 | - } |
|
| 38 | + $qb->expr ()->between ( 'i.dataRaportu', ':from', ':to' ) ) /* */ |
|
| 39 | + ->setParameters ( array ( |
|
| 40 | + 'from' => $from, |
|
| 41 | + 'to' => $to |
|
| 42 | + ) ); |
|
| 43 | + if ($wardId != 'all') { |
|
| 44 | + $qb->andWhere ( $qb->expr ()->eq ( 'i.ward', ':ward' ) ) /* */ |
|
| 45 | + ->setParameter ( 'ward', $wardId ); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - $query = $qb->getQuery (); |
|
| 49 | - $infections = $query->getResult (); |
|
| 48 | + $query = $qb->getQuery (); |
|
| 49 | + $infections = $query->getResult (); |
|
| 50 | 50 | |
| 51 | - return $infections; |
|
| 52 | - } |
|
| 53 | - public static function updateVerification($id, $weryfikacja) { |
|
| 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 (); |
|
| 59 | - } |
|
| 60 | - } |
|
| 61 | - public static function obj2DB($obj) { |
|
| 62 | - $id = $obj->id; |
|
| 63 | - $em = DoctrineBootstrap::getEntityManager(); |
|
| 64 | - $infection = $em->getRepository('Hospitalplugin\Entities\Infections')->find($id); |
|
| 65 | - $infection->setWeryfikacja($obj->value); |
|
| 66 | - $em->persist($infection); |
|
| 67 | - $em->flush(); |
|
| 68 | - echo $id; |
|
| 69 | - } |
|
| 51 | + return $infections; |
|
| 52 | + } |
|
| 53 | + public static function updateVerification($id, $weryfikacja) { |
|
| 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 (); |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | + public static function obj2DB($obj) { |
|
| 62 | + $id = $obj->id; |
|
| 63 | + $em = DoctrineBootstrap::getEntityManager(); |
|
| 64 | + $infection = $em->getRepository('Hospitalplugin\Entities\Infections')->find($id); |
|
| 65 | + $infection->setWeryfikacja($obj->value); |
|
| 66 | + $em->persist($infection); |
|
| 67 | + $em->flush(); |
|
| 68 | + echo $id; |
|
| 69 | + } |
|
| 70 | 70 | } |
| 71 | 71 | ?> |
| 72 | 72 | \ No newline at end of file |
@@ -29,33 +29,33 @@ |
||
| 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) { |
@@ -46,90 +46,90 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | class InfectionsZMO extends InfectionRaport{ |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 51 | - */ |
|
| 52 | - public $LKZMO; |
|
| 49 | + /** |
|
| 50 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 51 | + */ |
|
| 52 | + public $LKZMO; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 56 | - */ |
|
| 57 | - public $ZMO1; |
|
| 54 | + /** |
|
| 55 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 56 | + */ |
|
| 57 | + public $ZMO1; |
|
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 61 | - */ |
|
| 62 | - public $ZMO2; |
|
| 59 | + /** |
|
| 60 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 61 | + */ |
|
| 62 | + public $ZMO2; |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 66 | - */ |
|
| 67 | - public $ZMO3; |
|
| 64 | + /** |
|
| 65 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 66 | + */ |
|
| 67 | + public $ZMO3; |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 71 | - */ |
|
| 72 | - public $ZMO4; |
|
| 69 | + /** |
|
| 70 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 71 | + */ |
|
| 72 | + public $ZMO4; |
|
| 73 | 73 | |
| 74 | - /** |
|
| 75 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 76 | - */ |
|
| 77 | - public $BM; |
|
| 74 | + /** |
|
| 75 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 76 | + */ |
|
| 77 | + public $BM; |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 81 | - */ |
|
| 82 | - public $PH; |
|
| 79 | + /** |
|
| 80 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 81 | + */ |
|
| 82 | + public $PH; |
|
| 83 | 83 | |
| 84 | - public function getLKZMO() { |
|
| 85 | - return $this->LKZMO; |
|
| 86 | - } |
|
| 87 | - public function setLKZMO($LKZMO) { |
|
| 88 | - $this->LKZMO = $LKZMO; |
|
| 89 | - return $this; |
|
| 90 | - } |
|
| 91 | - public function getZMO1() { |
|
| 92 | - return $this->ZMO1; |
|
| 93 | - } |
|
| 94 | - public function setZMO1($ZMO1) { |
|
| 95 | - $this->ZMO1 = $ZMO1; |
|
| 96 | - return $this; |
|
| 97 | - } |
|
| 98 | - public function getZMO2() { |
|
| 99 | - return $this->ZMO2; |
|
| 100 | - } |
|
| 101 | - public function setZMO2($ZMO2) { |
|
| 102 | - $this->ZMO2 = $ZMO2; |
|
| 103 | - return $this; |
|
| 104 | - } |
|
| 105 | - public function getZMO3() { |
|
| 106 | - return $this->ZMO3; |
|
| 107 | - } |
|
| 108 | - public function setZMO3($ZMO3) { |
|
| 109 | - $this->ZMO3 = $ZMO3; |
|
| 110 | - return $this; |
|
| 111 | - } |
|
| 112 | - public function getZMO4() { |
|
| 113 | - return $this->ZMO4; |
|
| 114 | - } |
|
| 115 | - public function setZMO4($ZMO4) { |
|
| 116 | - $this->ZMO4 = $ZMO4; |
|
| 117 | - return $this; |
|
| 118 | - } |
|
| 119 | - public function getBM() { |
|
| 120 | - return $this->BM; |
|
| 121 | - } |
|
| 122 | - public function setBM($BM) { |
|
| 123 | - $this->BM = $BM; |
|
| 124 | - return $this; |
|
| 125 | - } |
|
| 126 | - public function getPH() { |
|
| 127 | - return $this->PH; |
|
| 128 | - } |
|
| 129 | - public function setPH($PH) { |
|
| 130 | - $this->PH = $PH; |
|
| 131 | - return $this; |
|
| 132 | - } |
|
| 84 | + public function getLKZMO() { |
|
| 85 | + return $this->LKZMO; |
|
| 86 | + } |
|
| 87 | + public function setLKZMO($LKZMO) { |
|
| 88 | + $this->LKZMO = $LKZMO; |
|
| 89 | + return $this; |
|
| 90 | + } |
|
| 91 | + public function getZMO1() { |
|
| 92 | + return $this->ZMO1; |
|
| 93 | + } |
|
| 94 | + public function setZMO1($ZMO1) { |
|
| 95 | + $this->ZMO1 = $ZMO1; |
|
| 96 | + return $this; |
|
| 97 | + } |
|
| 98 | + public function getZMO2() { |
|
| 99 | + return $this->ZMO2; |
|
| 100 | + } |
|
| 101 | + public function setZMO2($ZMO2) { |
|
| 102 | + $this->ZMO2 = $ZMO2; |
|
| 103 | + return $this; |
|
| 104 | + } |
|
| 105 | + public function getZMO3() { |
|
| 106 | + return $this->ZMO3; |
|
| 107 | + } |
|
| 108 | + public function setZMO3($ZMO3) { |
|
| 109 | + $this->ZMO3 = $ZMO3; |
|
| 110 | + return $this; |
|
| 111 | + } |
|
| 112 | + public function getZMO4() { |
|
| 113 | + return $this->ZMO4; |
|
| 114 | + } |
|
| 115 | + public function setZMO4($ZMO4) { |
|
| 116 | + $this->ZMO4 = $ZMO4; |
|
| 117 | + return $this; |
|
| 118 | + } |
|
| 119 | + public function getBM() { |
|
| 120 | + return $this->BM; |
|
| 121 | + } |
|
| 122 | + public function setBM($BM) { |
|
| 123 | + $this->BM = $BM; |
|
| 124 | + return $this; |
|
| 125 | + } |
|
| 126 | + public function getPH() { |
|
| 127 | + return $this->PH; |
|
| 128 | + } |
|
| 129 | + public function setPH($PH) { |
|
| 130 | + $this->PH = $PH; |
|
| 131 | + return $this; |
|
| 132 | + } |
|
| 133 | 133 | |
| 134 | 134 | |
| 135 | 135 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | * @index(name="oddzialId_idx", columns={"oddzialId"}), |
| 45 | 45 | * @index(name="userId_idx", columns={"userId"})}) |
| 46 | 46 | */ |
| 47 | -class InfectionsZMO extends InfectionRaport{ |
|
| 47 | +class InfectionsZMO extends InfectionRaport { |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
@@ -46,182 +46,182 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | class InfectionsZODC extends InfectionRaport { |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 51 | - */ |
|
| 52 | - public $LDZ; |
|
| 49 | + /** |
|
| 50 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 51 | + */ |
|
| 52 | + public $LDZ; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 56 | - */ |
|
| 57 | - public $LDKZ; |
|
| 54 | + /** |
|
| 55 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 56 | + */ |
|
| 57 | + public $LDKZ; |
|
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 61 | - */ |
|
| 62 | - public $PDOZ; |
|
| 63 | - |
|
| 64 | - /** |
|
| 65 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 66 | - */ |
|
| 67 | - public $LDCZ; |
|
| 59 | + /** |
|
| 60 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 61 | + */ |
|
| 62 | + public $PDOZ; |
|
| 63 | + |
|
| 64 | + /** |
|
| 65 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 66 | + */ |
|
| 67 | + public $LDCZ; |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 71 | - */ |
|
| 72 | - public $LDKCZ; |
|
| 69 | + /** |
|
| 70 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 71 | + */ |
|
| 72 | + public $LDKCZ; |
|
| 73 | 73 | |
| 74 | - /** |
|
| 75 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 76 | - */ |
|
| 77 | - public $PDCZ; |
|
| 74 | + /** |
|
| 75 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 76 | + */ |
|
| 77 | + public $PDCZ; |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 81 | - */ |
|
| 82 | - public $LDD; |
|
| 79 | + /** |
|
| 80 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 81 | + */ |
|
| 82 | + public $LDD; |
|
| 83 | 83 | |
| 84 | - /** |
|
| 85 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 86 | - */ |
|
| 87 | - public $LDKD; |
|
| 84 | + /** |
|
| 85 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 86 | + */ |
|
| 87 | + public $LDKD; |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 91 | - */ |
|
| 92 | - public $PDD; |
|
| 89 | + /** |
|
| 90 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 91 | + */ |
|
| 92 | + public $PDD; |
|
| 93 | 93 | |
| 94 | - /** |
|
| 95 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 96 | - */ |
|
| 97 | - public $LDT; |
|
| 94 | + /** |
|
| 95 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 96 | + */ |
|
| 97 | + public $LDT; |
|
| 98 | 98 | |
| 99 | - /** |
|
| 100 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 101 | - */ |
|
| 102 | - public $LDKT; |
|
| 99 | + /** |
|
| 100 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 101 | + */ |
|
| 102 | + public $LDKT; |
|
| 103 | 103 | |
| 104 | - /** |
|
| 105 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 106 | - */ |
|
| 107 | - public $PDT; |
|
| 104 | + /** |
|
| 105 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 106 | + */ |
|
| 107 | + public $PDT; |
|
| 108 | 108 | |
| 109 | - /** |
|
| 110 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 111 | - */ |
|
| 112 | - public $BM; |
|
| 113 | - |
|
| 114 | - public function getLDZ() { |
|
| 115 | - return $this->LDZ; |
|
| 116 | - } |
|
| 117 | - public function setLDZ($LDZ) { |
|
| 118 | - $this->LDZ = $LDZ; |
|
| 119 | - return $this; |
|
| 120 | - } |
|
| 121 | - |
|
| 122 | - |
|
| 123 | - public function getLDKZ() { |
|
| 124 | - return $this->LDKZ; |
|
| 125 | - } |
|
| 126 | - public function setLDKZ($LDKZ) { |
|
| 127 | - $this->LDKZ = $LDKZ; |
|
| 128 | - return $this; |
|
| 129 | - } |
|
| 130 | - |
|
| 131 | - public function getPDOZ() { |
|
| 132 | - return $this->PDOZ; |
|
| 133 | - } |
|
| 134 | - public function setPDOZ($PDOZ) { |
|
| 135 | - $this->PDOZ = $PDOZ; |
|
| 136 | - return $this; |
|
| 137 | - } |
|
| 138 | - |
|
| 139 | - |
|
| 140 | - public function getLDCZ() { |
|
| 141 | - return $this->LDCZ; |
|
| 142 | - } |
|
| 143 | - public function setLDCZ($LDCZ) { |
|
| 144 | - $this->LDCZ = $LDCZ; |
|
| 145 | - return $this; |
|
| 146 | - } |
|
| 147 | - |
|
| 148 | - |
|
| 149 | - public function getLDKCZ() { |
|
| 150 | - return $this->LDKCZ; |
|
| 151 | - } |
|
| 152 | - public function setLDKCZ($LDKCZ) { |
|
| 153 | - $this->LDKCZ = $LDKCZ; |
|
| 154 | - return $this; |
|
| 155 | - } |
|
| 156 | - |
|
| 157 | - |
|
| 158 | - public function getPDCZ() { |
|
| 159 | - return $this->PDCZ; |
|
| 160 | - } |
|
| 161 | - public function setPDCZ($PDCZ) { |
|
| 162 | - $this->PDCZ = $PDCZ; |
|
| 163 | - return $this; |
|
| 164 | - } |
|
| 165 | - |
|
| 166 | - |
|
| 167 | - public function getLDD() { |
|
| 168 | - return $this->LDD; |
|
| 169 | - } |
|
| 170 | - public function setLDD($LDD) { |
|
| 171 | - $this->LDD = $LDD; |
|
| 172 | - return $this; |
|
| 173 | - } |
|
| 174 | - |
|
| 175 | - |
|
| 176 | - public function getLDKD() { |
|
| 177 | - return $this->LDKD; |
|
| 178 | - } |
|
| 179 | - public function setLDKD($LDKD) { |
|
| 180 | - $this->LDKD = $LDKD; |
|
| 181 | - return $this; |
|
| 182 | - } |
|
| 183 | - |
|
| 184 | - |
|
| 185 | - public function getPDD() { |
|
| 186 | - return $this->PDD; |
|
| 187 | - } |
|
| 188 | - public function setPDD($PDD) { |
|
| 189 | - $this->PDD = $PDD; |
|
| 190 | - return $this; |
|
| 191 | - } |
|
| 192 | - |
|
| 193 | - |
|
| 194 | - public function getLDT() { |
|
| 195 | - return $this->LDT; |
|
| 196 | - } |
|
| 197 | - public function setLDT($LDT) { |
|
| 198 | - $this->LDT = $LDT; |
|
| 199 | - return $this; |
|
| 200 | - } |
|
| 201 | - |
|
| 202 | - |
|
| 203 | - public function getLDKT() { |
|
| 204 | - return $this->LDKT; |
|
| 205 | - } |
|
| 206 | - public function setLDKT($LDKT) { |
|
| 207 | - $this->LDKT = $LDKT; |
|
| 208 | - return $this; |
|
| 209 | - } |
|
| 210 | - |
|
| 211 | - |
|
| 212 | - public function getPDT() { |
|
| 213 | - return $this->PDT; |
|
| 214 | - } |
|
| 215 | - public function setPDT($PDT) { |
|
| 216 | - $this->PDT = $PDT; |
|
| 217 | - return $this; |
|
| 218 | - } |
|
| 219 | - |
|
| 220 | - public function getBM() { |
|
| 221 | - return $this->BM; |
|
| 222 | - } |
|
| 223 | - public function setBM($BM) { |
|
| 224 | - $this->BM = $BM; |
|
| 225 | - return $this; |
|
| 226 | - } |
|
| 109 | + /** |
|
| 110 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 111 | + */ |
|
| 112 | + public $BM; |
|
| 113 | + |
|
| 114 | + public function getLDZ() { |
|
| 115 | + return $this->LDZ; |
|
| 116 | + } |
|
| 117 | + public function setLDZ($LDZ) { |
|
| 118 | + $this->LDZ = $LDZ; |
|
| 119 | + return $this; |
|
| 120 | + } |
|
| 121 | + |
|
| 122 | + |
|
| 123 | + public function getLDKZ() { |
|
| 124 | + return $this->LDKZ; |
|
| 125 | + } |
|
| 126 | + public function setLDKZ($LDKZ) { |
|
| 127 | + $this->LDKZ = $LDKZ; |
|
| 128 | + return $this; |
|
| 129 | + } |
|
| 130 | + |
|
| 131 | + public function getPDOZ() { |
|
| 132 | + return $this->PDOZ; |
|
| 133 | + } |
|
| 134 | + public function setPDOZ($PDOZ) { |
|
| 135 | + $this->PDOZ = $PDOZ; |
|
| 136 | + return $this; |
|
| 137 | + } |
|
| 138 | + |
|
| 139 | + |
|
| 140 | + public function getLDCZ() { |
|
| 141 | + return $this->LDCZ; |
|
| 142 | + } |
|
| 143 | + public function setLDCZ($LDCZ) { |
|
| 144 | + $this->LDCZ = $LDCZ; |
|
| 145 | + return $this; |
|
| 146 | + } |
|
| 147 | + |
|
| 148 | + |
|
| 149 | + public function getLDKCZ() { |
|
| 150 | + return $this->LDKCZ; |
|
| 151 | + } |
|
| 152 | + public function setLDKCZ($LDKCZ) { |
|
| 153 | + $this->LDKCZ = $LDKCZ; |
|
| 154 | + return $this; |
|
| 155 | + } |
|
| 156 | + |
|
| 157 | + |
|
| 158 | + public function getPDCZ() { |
|
| 159 | + return $this->PDCZ; |
|
| 160 | + } |
|
| 161 | + public function setPDCZ($PDCZ) { |
|
| 162 | + $this->PDCZ = $PDCZ; |
|
| 163 | + return $this; |
|
| 164 | + } |
|
| 165 | + |
|
| 166 | + |
|
| 167 | + public function getLDD() { |
|
| 168 | + return $this->LDD; |
|
| 169 | + } |
|
| 170 | + public function setLDD($LDD) { |
|
| 171 | + $this->LDD = $LDD; |
|
| 172 | + return $this; |
|
| 173 | + } |
|
| 174 | + |
|
| 175 | + |
|
| 176 | + public function getLDKD() { |
|
| 177 | + return $this->LDKD; |
|
| 178 | + } |
|
| 179 | + public function setLDKD($LDKD) { |
|
| 180 | + $this->LDKD = $LDKD; |
|
| 181 | + return $this; |
|
| 182 | + } |
|
| 183 | + |
|
| 184 | + |
|
| 185 | + public function getPDD() { |
|
| 186 | + return $this->PDD; |
|
| 187 | + } |
|
| 188 | + public function setPDD($PDD) { |
|
| 189 | + $this->PDD = $PDD; |
|
| 190 | + return $this; |
|
| 191 | + } |
|
| 192 | + |
|
| 193 | + |
|
| 194 | + public function getLDT() { |
|
| 195 | + return $this->LDT; |
|
| 196 | + } |
|
| 197 | + public function setLDT($LDT) { |
|
| 198 | + $this->LDT = $LDT; |
|
| 199 | + return $this; |
|
| 200 | + } |
|
| 201 | + |
|
| 202 | + |
|
| 203 | + public function getLDKT() { |
|
| 204 | + return $this->LDKT; |
|
| 205 | + } |
|
| 206 | + public function setLDKT($LDKT) { |
|
| 207 | + $this->LDKT = $LDKT; |
|
| 208 | + return $this; |
|
| 209 | + } |
|
| 210 | + |
|
| 211 | + |
|
| 212 | + public function getPDT() { |
|
| 213 | + return $this->PDT; |
|
| 214 | + } |
|
| 215 | + public function setPDT($PDT) { |
|
| 216 | + $this->PDT = $PDT; |
|
| 217 | + return $this; |
|
| 218 | + } |
|
| 219 | + |
|
| 220 | + public function getBM() { |
|
| 221 | + return $this->BM; |
|
| 222 | + } |
|
| 223 | + public function setBM($BM) { |
|
| 224 | + $this->BM = $BM; |
|
| 225 | + return $this; |
|
| 226 | + } |
|
| 227 | 227 | } |
@@ -46,70 +46,70 @@ |
||
| 46 | 46 | */ |
| 47 | 47 | class InfectionsZUM extends InfectionRaport { |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 51 | - */ |
|
| 52 | - public $LPKZUM; |
|
| 49 | + /** |
|
| 50 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 51 | + */ |
|
| 52 | + public $LPKZUM; |
|
| 53 | 53 | |
| 54 | - /** |
|
| 55 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 56 | - */ |
|
| 57 | - public $LPZUM; |
|
| 54 | + /** |
|
| 55 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 56 | + */ |
|
| 57 | + public $LPZUM; |
|
| 58 | 58 | |
| 59 | - /** |
|
| 60 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 61 | - */ |
|
| 62 | - public $LPZUM1; |
|
| 59 | + /** |
|
| 60 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 61 | + */ |
|
| 62 | + public $LPZUM1; |
|
| 63 | 63 | |
| 64 | - /** |
|
| 65 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 66 | - */ |
|
| 67 | - public $LPZUM2; |
|
| 64 | + /** |
|
| 65 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 66 | + */ |
|
| 67 | + public $LPZUM2; |
|
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 71 | - */ |
|
| 72 | - public $BM; |
|
| 69 | + /** |
|
| 70 | + * @Column(columnDefinition="DECIMAL(4,0) NOT NULL DEFAULT 0") * |
|
| 71 | + */ |
|
| 72 | + public $BM; |
|
| 73 | 73 | |
| 74 | - public function getLPKZUM() { |
|
| 75 | - return $this->LPKZUM; |
|
| 76 | - } |
|
| 77 | - public function setLPKZUM($LPKZUM) { |
|
| 78 | - $this->LPKZUM = $LPKZUM; |
|
| 79 | - return $this; |
|
| 80 | - } |
|
| 74 | + public function getLPKZUM() { |
|
| 75 | + return $this->LPKZUM; |
|
| 76 | + } |
|
| 77 | + public function setLPKZUM($LPKZUM) { |
|
| 78 | + $this->LPKZUM = $LPKZUM; |
|
| 79 | + return $this; |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - public function getLPZUM() { |
|
| 83 | - return $this->LPZUM; |
|
| 84 | - } |
|
| 85 | - public function setLPZUM($LPZUM) { |
|
| 86 | - $this->LPZUM = $LPZUM; |
|
| 87 | - return $this; |
|
| 88 | - } |
|
| 82 | + public function getLPZUM() { |
|
| 83 | + return $this->LPZUM; |
|
| 84 | + } |
|
| 85 | + public function setLPZUM($LPZUM) { |
|
| 86 | + $this->LPZUM = $LPZUM; |
|
| 87 | + return $this; |
|
| 88 | + } |
|
| 89 | 89 | |
| 90 | - public function getLPZUM1() { |
|
| 91 | - return $this->LPZUM1; |
|
| 92 | - } |
|
| 93 | - public function setLPZUM1($LPZUM1) { |
|
| 94 | - $this->LPZUM1 = $LPZUM1; |
|
| 95 | - return $this; |
|
| 96 | - } |
|
| 90 | + public function getLPZUM1() { |
|
| 91 | + return $this->LPZUM1; |
|
| 92 | + } |
|
| 93 | + public function setLPZUM1($LPZUM1) { |
|
| 94 | + $this->LPZUM1 = $LPZUM1; |
|
| 95 | + return $this; |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - public function getLPZUM2() { |
|
| 99 | - return $this->LPZUM2; |
|
| 100 | - } |
|
| 101 | - public function setLPZUM2($LPZUM2) { |
|
| 102 | - $this->LPZUM2 = $LPZUM2; |
|
| 103 | - return $this; |
|
| 104 | - } |
|
| 98 | + public function getLPZUM2() { |
|
| 99 | + return $this->LPZUM2; |
|
| 100 | + } |
|
| 101 | + public function setLPZUM2($LPZUM2) { |
|
| 102 | + $this->LPZUM2 = $LPZUM2; |
|
| 103 | + return $this; |
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | - public function getBM() { |
|
| 107 | - return $this->BM; |
|
| 108 | - } |
|
| 109 | - public function setBM($BM) { |
|
| 110 | - $this->BM = $BM; |
|
| 111 | - return $this; |
|
| 112 | - } |
|
| 106 | + public function getBM() { |
|
| 107 | + return $this->BM; |
|
| 108 | + } |
|
| 109 | + public function setBM($BM) { |
|
| 110 | + $this->BM = $BM; |
|
| 111 | + return $this; |
|
| 112 | + } |
|
| 113 | 113 | |
| 114 | 114 | |
| 115 | 115 | |
@@ -113,17 +113,17 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -57,365 +57,365 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | class Patient { |
| 59 | 59 | |
| 60 | - /** |
|
| 61 | - * |
|
| 62 | - * @var string $typ typ pacjenta |
|
| 63 | - */ |
|
| 64 | - protected $typ = ""; |
|
| 65 | - |
|
| 66 | - /** |
|
| 67 | - * id |
|
| 68 | - * @Id @Column(type="integer") @GeneratedValue |
|
| 69 | - */ |
|
| 70 | - public $id; |
|
| 71 | - |
|
| 72 | - /** |
|
| 73 | - * name |
|
| 74 | - * @Column(type="string", length=50) |
|
| 75 | - */ |
|
| 76 | - public $name; |
|
| 77 | - |
|
| 78 | - /** |
|
| 79 | - * @Column(type="string", length=11) |
|
| 80 | - */ |
|
| 81 | - public $pesel; |
|
| 82 | - |
|
| 83 | - /** |
|
| 84 | - * @Column(type="integer") * |
|
| 85 | - */ |
|
| 86 | - public $numerHistorii; |
|
| 87 | - |
|
| 88 | - /** |
|
| 89 | - * $dataKategoryzacji datetime |
|
| 90 | - * @Column(type="datetime") * |
|
| 91 | - */ |
|
| 92 | - public $dataKategoryzacji; |
|
| 93 | - |
|
| 94 | - /** |
|
| 95 | - * @Column(type="integer") * |
|
| 96 | - */ |
|
| 97 | - protected $oddzialId; |
|
| 98 | - |
|
| 99 | - /** |
|
| 100 | - * @Column(columnDefinition="TINYINT(4) NOT NULL DEFAULT 0") |
|
| 101 | - */ |
|
| 102 | - public $kategoriaPacjenta = 0; |
|
| 103 | - |
|
| 104 | - /** |
|
| 105 | - * @ManyToOne(targetEntity="Hospitalplugin\Entities\User") |
|
| 106 | - * @JoinColumn(name="userId", referencedColumnName="id", nullable=true) |
|
| 107 | - * @Column(columnDefinition="INT(11) NOT NULL DEFAULT 0") |
|
| 108 | - */ |
|
| 109 | - public $user; |
|
| 110 | - |
|
| 111 | - /** |
|
| 112 | - * Constructor |
|
| 113 | - * |
|
| 114 | - * @param unknown $args |
|
| 115 | - */ |
|
| 116 | - function __construct($args) { |
|
| 117 | - if (! isset ( $args ) || empty ( $args )) { |
|
| 118 | - return; |
|
| 119 | - } |
|
| 120 | - foreach ( $args as $key => $value ) { |
|
| 121 | - if ($key == 'dataKategoryzacji') { |
|
| 122 | - $value = new \DateTime ( $value . ' 12:00:00' ); |
|
| 123 | - } |
|
| 124 | - call_user_func ( array ( |
|
| 125 | - $this, |
|
| 126 | - 'set' . $key |
|
| 127 | - ), $value ); |
|
| 128 | - } |
|
| 129 | - } |
|
| 130 | - |
|
| 131 | - /** |
|
| 132 | - * getId |
|
| 133 | - * |
|
| 134 | - * @return id |
|
| 135 | - */ |
|
| 136 | - public function getId() { |
|
| 137 | - return $this->id; |
|
| 138 | - } |
|
| 139 | - |
|
| 140 | - /** |
|
| 141 | - * sets id |
|
| 142 | - * |
|
| 143 | - * @param int $id |
|
| 144 | - * ID |
|
| 145 | - * |
|
| 146 | - * @return \Hospitalplugin\Entities\Patient |
|
| 147 | - */ |
|
| 148 | - public function setId($id) { |
|
| 149 | - $this->id = $id; |
|
| 150 | - return $this; |
|
| 151 | - } |
|
| 152 | - |
|
| 153 | - /** |
|
| 154 | - * getName |
|
| 155 | - * |
|
| 156 | - * @return name |
|
| 157 | - */ |
|
| 158 | - public function getName() { |
|
| 159 | - return $this->name; |
|
| 160 | - } |
|
| 161 | - |
|
| 162 | - /** |
|
| 163 | - * setName |
|
| 164 | - * |
|
| 165 | - * @param string $name |
|
| 166 | - * string name |
|
| 167 | - * |
|
| 168 | - * @return Patient |
|
| 169 | - */ |
|
| 170 | - public function setName($name) { |
|
| 171 | - $this->name = $name; |
|
| 172 | - return $this; |
|
| 173 | - } |
|
| 174 | - |
|
| 175 | - /** |
|
| 176 | - * getDataKategoryzacji |
|
| 177 | - * |
|
| 178 | - * @return \DateTime dataKategoryzacji |
|
| 179 | - */ |
|
| 180 | - public function getDataKategoryzacji() { |
|
| 181 | - return $this->dataKategoryzacji; |
|
| 182 | - } |
|
| 183 | - |
|
| 184 | - /** |
|
| 185 | - * setDataKategoryzacji |
|
| 186 | - * |
|
| 187 | - * @param \DateTime $dataKategoryzacji |
|
| 188 | - * data kategoryzyzacji |
|
| 189 | - * |
|
| 190 | - * @return Patient |
|
| 191 | - */ |
|
| 192 | - public function setDataKategoryzacji(\DateTime $dataKategoryzacji) { |
|
| 193 | - $this->dataKategoryzacji = $dataKategoryzacji; |
|
| 194 | - return $this; |
|
| 195 | - } |
|
| 196 | - |
|
| 197 | - /** |
|
| 198 | - * getOddzialId |
|
| 199 | - * |
|
| 200 | - * @return oddzialId |
|
| 201 | - */ |
|
| 202 | - public function getOddzialId() { |
|
| 203 | - return $this->oddzialId; |
|
| 204 | - } |
|
| 205 | - |
|
| 206 | - /** |
|
| 207 | - * setOddzialId |
|
| 208 | - * |
|
| 209 | - * @param int $oddzialId |
|
| 210 | - * oddzial id |
|
| 211 | - * |
|
| 212 | - * @return Patient |
|
| 213 | - */ |
|
| 214 | - public function setOddzialId($oddzialId) { |
|
| 215 | - $this->oddzialId = $oddzialId; |
|
| 216 | - return $this; |
|
| 217 | - } |
|
| 218 | - |
|
| 219 | - /** |
|
| 220 | - * |
|
| 221 | - * @param Ward $ward |
|
| 222 | - */ |
|
| 223 | - public function setWard($ward) { |
|
| 224 | - $this->oddzialId = $ward->id; |
|
| 225 | - return $this; |
|
| 226 | - } |
|
| 227 | - |
|
| 228 | - /** |
|
| 229 | - * getOddzialId |
|
| 230 | - * |
|
| 231 | - * @return oddzialId |
|
| 232 | - */ |
|
| 233 | - public function getNumerHistorii() { |
|
| 234 | - return $this->numerHistorii; |
|
| 235 | - } |
|
| 236 | - |
|
| 237 | - /** |
|
| 238 | - * setOddzialId |
|
| 239 | - * |
|
| 240 | - * @param int $oddzialId |
|
| 241 | - * oddzial id |
|
| 242 | - * |
|
| 243 | - * @return Patient |
|
| 244 | - */ |
|
| 245 | - public function setNumerHistorii($numerHistorii) { |
|
| 246 | - $this->numerHistorii = $numerHistorii; |
|
| 247 | - return $this; |
|
| 248 | - } |
|
| 249 | - |
|
| 250 | - /** |
|
| 251 | - * getPesel |
|
| 252 | - * |
|
| 253 | - * @return pesel |
|
| 254 | - */ |
|
| 255 | - public function getPesel() { |
|
| 256 | - return $this->pesel; |
|
| 257 | - } |
|
| 258 | - |
|
| 259 | - /** |
|
| 260 | - * setPesel |
|
| 261 | - * |
|
| 262 | - * @param string $pesel |
|
| 263 | - * nr pesel |
|
| 264 | - * |
|
| 265 | - * @return Patient |
|
| 266 | - */ |
|
| 267 | - public function setPesel($pesel) { |
|
| 268 | - $this->pesel = $pesel; |
|
| 269 | - return $this; |
|
| 270 | - } |
|
| 271 | - |
|
| 272 | - /** |
|
| 273 | - * getKategoriaPacjenta |
|
| 274 | - * |
|
| 275 | - * @return kategoriaPacjenta |
|
| 276 | - */ |
|
| 277 | - public function getKategoriaPacjenta() { |
|
| 278 | - return $this->kategoriaPacjenta; |
|
| 279 | - } |
|
| 280 | - |
|
| 281 | - /** |
|
| 282 | - * setKategoriaPacjenta |
|
| 283 | - * |
|
| 284 | - * @param int $kategoriaPacjenta |
|
| 285 | - * kategoriaPacjenta |
|
| 286 | - * |
|
| 287 | - * @return Patient |
|
| 288 | - */ |
|
| 289 | - public function setKategoriaPacjenta($kategoriaPacjenta) { |
|
| 290 | - $this->kategoriaPacjenta = $kategoriaPacjenta; |
|
| 291 | - return $this; |
|
| 292 | - } |
|
| 293 | - |
|
| 294 | - /** |
|
| 295 | - * getTyp |
|
| 296 | - * |
|
| 297 | - * @return typ |
|
| 298 | - */ |
|
| 299 | - public function getTyp() { |
|
| 300 | - return $this->typ; |
|
| 301 | - } |
|
| 302 | - |
|
| 303 | - /** |
|
| 304 | - * setTyp |
|
| 305 | - * |
|
| 306 | - * @param string $typ |
|
| 307 | - * |
|
| 308 | - * @return \Hospitalplugin\Entities\Patient |
|
| 309 | - */ |
|
| 310 | - public function setTyp($typ) { |
|
| 311 | - $this->typ = $typ; |
|
| 312 | - return $this; |
|
| 313 | - } |
|
| 314 | - |
|
| 315 | - /** |
|
| 316 | - * getUser |
|
| 317 | - */ |
|
| 318 | - public function getUser() { |
|
| 319 | - return $this->user; |
|
| 320 | - } |
|
| 321 | - |
|
| 322 | - /** |
|
| 323 | - * |
|
| 324 | - * @param User $user |
|
| 325 | - */ |
|
| 326 | - public function setUser($user) { |
|
| 327 | - $this->user = $user; |
|
| 328 | - return $this; |
|
| 329 | - } |
|
| 330 | - |
|
| 331 | - /** |
|
| 332 | - * toString |
|
| 333 | - * |
|
| 334 | - * @return string |
|
| 335 | - */ |
|
| 336 | - public function toString() { |
|
| 337 | - $txt = $this->getName (); |
|
| 338 | - $txt .= $this->getPesel (); |
|
| 339 | - $txt .= "id:"; |
|
| 340 | - $txt .= $this->getId (); |
|
| 341 | - $txt .= "oid:"; |
|
| 342 | - $txt .= $this->getOddzialId (); |
|
| 343 | - $txt .= "d:"; |
|
| 344 | - $data = $this->getDataKategoryzacji (); |
|
| 345 | - if ($data instanceof \DateTime) { |
|
| 346 | - $txt .= $this->getDataKategoryzacji ()->format ( "Y-m-d" ); |
|
| 347 | - } else { |
|
| 348 | - $txt .= $this->getDataKategoryzacji (); |
|
| 349 | - } |
|
| 350 | - return $txt; |
|
| 351 | - } |
|
| 352 | - public function __toString() { |
|
| 353 | - return $this->toString (); |
|
| 354 | - } |
|
| 355 | - |
|
| 356 | - /** |
|
| 357 | - * getFields |
|
| 358 | - * |
|
| 359 | - * @return multitype:string |
|
| 360 | - */ |
|
| 361 | - protected static function getFields() { |
|
| 362 | - $fields = array ( |
|
| 363 | - "id", |
|
| 364 | - "name", |
|
| 365 | - "pesel", |
|
| 366 | - "numerHistorii", |
|
| 367 | - "dataKategoryzacji", |
|
| 368 | - "kategoriaPacjenta" |
|
| 369 | - ); |
|
| 370 | - return $fields; |
|
| 371 | - } |
|
| 372 | - |
|
| 373 | - /** |
|
| 374 | - * toDatatablesJSONString |
|
| 375 | - * |
|
| 376 | - * @return string |
|
| 377 | - */ |
|
| 378 | - public function toDatatablesJSONString() { |
|
| 379 | - $return_object_array = [ ]; |
|
| 380 | - $fields = $this->getFields (); |
|
| 381 | - foreach ( $fields as $field ) { |
|
| 382 | - $value = call_user_func ( array ( |
|
| 383 | - $this, |
|
| 384 | - 'get' . $field |
|
| 385 | - ) ); |
|
| 386 | - if ($value instanceof \DateTime) { |
|
| 387 | - $value = $value->format ( 'Y-m-d' ); |
|
| 388 | - } |
|
| 389 | - array_push ( $return_object_array, array ( |
|
| 390 | - $field => $value |
|
| 391 | - ) ); |
|
| 392 | - } |
|
| 393 | - return json_encode ( $this ); |
|
| 394 | - } |
|
| 395 | - |
|
| 396 | - /** |
|
| 397 | - * String with comma separated values. |
|
| 398 | - * |
|
| 399 | - * @deprecated JSON used |
|
| 400 | - * @param unknown $patient |
|
| 401 | - * |
|
| 402 | - * @return string |
|
| 403 | - */ |
|
| 404 | - public function toDatatablesString() { |
|
| 405 | - $string = ""; |
|
| 406 | - $fields = $this::getFields (); |
|
| 407 | - foreach ( $fields as $field ) { |
|
| 408 | - $value = call_user_func ( array ( |
|
| 409 | - $this, |
|
| 410 | - 'get' . $field |
|
| 411 | - ) ); |
|
| 412 | - if ($value instanceof \DateTime) { |
|
| 413 | - $value = $value->format ( 'Y-m-d' ); |
|
| 414 | - } |
|
| 415 | - $string .= $value . ","; |
|
| 416 | - } |
|
| 417 | - $string = trim ( $string, "," ); |
|
| 418 | - $string = str_replace ( "\n", "", $string ); |
|
| 419 | - return $string; |
|
| 420 | - } |
|
| 60 | + /** |
|
| 61 | + * |
|
| 62 | + * @var string $typ typ pacjenta |
|
| 63 | + */ |
|
| 64 | + protected $typ = ""; |
|
| 65 | + |
|
| 66 | + /** |
|
| 67 | + * id |
|
| 68 | + * @Id @Column(type="integer") @GeneratedValue |
|
| 69 | + */ |
|
| 70 | + public $id; |
|
| 71 | + |
|
| 72 | + /** |
|
| 73 | + * name |
|
| 74 | + * @Column(type="string", length=50) |
|
| 75 | + */ |
|
| 76 | + public $name; |
|
| 77 | + |
|
| 78 | + /** |
|
| 79 | + * @Column(type="string", length=11) |
|
| 80 | + */ |
|
| 81 | + public $pesel; |
|
| 82 | + |
|
| 83 | + /** |
|
| 84 | + * @Column(type="integer") * |
|
| 85 | + */ |
|
| 86 | + public $numerHistorii; |
|
| 87 | + |
|
| 88 | + /** |
|
| 89 | + * $dataKategoryzacji datetime |
|
| 90 | + * @Column(type="datetime") * |
|
| 91 | + */ |
|
| 92 | + public $dataKategoryzacji; |
|
| 93 | + |
|
| 94 | + /** |
|
| 95 | + * @Column(type="integer") * |
|
| 96 | + */ |
|
| 97 | + protected $oddzialId; |
|
| 98 | + |
|
| 99 | + /** |
|
| 100 | + * @Column(columnDefinition="TINYINT(4) NOT NULL DEFAULT 0") |
|
| 101 | + */ |
|
| 102 | + public $kategoriaPacjenta = 0; |
|
| 103 | + |
|
| 104 | + /** |
|
| 105 | + * @ManyToOne(targetEntity="Hospitalplugin\Entities\User") |
|
| 106 | + * @JoinColumn(name="userId", referencedColumnName="id", nullable=true) |
|
| 107 | + * @Column(columnDefinition="INT(11) NOT NULL DEFAULT 0") |
|
| 108 | + */ |
|
| 109 | + public $user; |
|
| 110 | + |
|
| 111 | + /** |
|
| 112 | + * Constructor |
|
| 113 | + * |
|
| 114 | + * @param unknown $args |
|
| 115 | + */ |
|
| 116 | + function __construct($args) { |
|
| 117 | + if (! isset ( $args ) || empty ( $args )) { |
|
| 118 | + return; |
|
| 119 | + } |
|
| 120 | + foreach ( $args as $key => $value ) { |
|
| 121 | + if ($key == 'dataKategoryzacji') { |
|
| 122 | + $value = new \DateTime ( $value . ' 12:00:00' ); |
|
| 123 | + } |
|
| 124 | + call_user_func ( array ( |
|
| 125 | + $this, |
|
| 126 | + 'set' . $key |
|
| 127 | + ), $value ); |
|
| 128 | + } |
|
| 129 | + } |
|
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * getId |
|
| 133 | + * |
|
| 134 | + * @return id |
|
| 135 | + */ |
|
| 136 | + public function getId() { |
|
| 137 | + return $this->id; |
|
| 138 | + } |
|
| 139 | + |
|
| 140 | + /** |
|
| 141 | + * sets id |
|
| 142 | + * |
|
| 143 | + * @param int $id |
|
| 144 | + * ID |
|
| 145 | + * |
|
| 146 | + * @return \Hospitalplugin\Entities\Patient |
|
| 147 | + */ |
|
| 148 | + public function setId($id) { |
|
| 149 | + $this->id = $id; |
|
| 150 | + return $this; |
|
| 151 | + } |
|
| 152 | + |
|
| 153 | + /** |
|
| 154 | + * getName |
|
| 155 | + * |
|
| 156 | + * @return name |
|
| 157 | + */ |
|
| 158 | + public function getName() { |
|
| 159 | + return $this->name; |
|
| 160 | + } |
|
| 161 | + |
|
| 162 | + /** |
|
| 163 | + * setName |
|
| 164 | + * |
|
| 165 | + * @param string $name |
|
| 166 | + * string name |
|
| 167 | + * |
|
| 168 | + * @return Patient |
|
| 169 | + */ |
|
| 170 | + public function setName($name) { |
|
| 171 | + $this->name = $name; |
|
| 172 | + return $this; |
|
| 173 | + } |
|
| 174 | + |
|
| 175 | + /** |
|
| 176 | + * getDataKategoryzacji |
|
| 177 | + * |
|
| 178 | + * @return \DateTime dataKategoryzacji |
|
| 179 | + */ |
|
| 180 | + public function getDataKategoryzacji() { |
|
| 181 | + return $this->dataKategoryzacji; |
|
| 182 | + } |
|
| 183 | + |
|
| 184 | + /** |
|
| 185 | + * setDataKategoryzacji |
|
| 186 | + * |
|
| 187 | + * @param \DateTime $dataKategoryzacji |
|
| 188 | + * data kategoryzyzacji |
|
| 189 | + * |
|
| 190 | + * @return Patient |
|
| 191 | + */ |
|
| 192 | + public function setDataKategoryzacji(\DateTime $dataKategoryzacji) { |
|
| 193 | + $this->dataKategoryzacji = $dataKategoryzacji; |
|
| 194 | + return $this; |
|
| 195 | + } |
|
| 196 | + |
|
| 197 | + /** |
|
| 198 | + * getOddzialId |
|
| 199 | + * |
|
| 200 | + * @return oddzialId |
|
| 201 | + */ |
|
| 202 | + public function getOddzialId() { |
|
| 203 | + return $this->oddzialId; |
|
| 204 | + } |
|
| 205 | + |
|
| 206 | + /** |
|
| 207 | + * setOddzialId |
|
| 208 | + * |
|
| 209 | + * @param int $oddzialId |
|
| 210 | + * oddzial id |
|
| 211 | + * |
|
| 212 | + * @return Patient |
|
| 213 | + */ |
|
| 214 | + public function setOddzialId($oddzialId) { |
|
| 215 | + $this->oddzialId = $oddzialId; |
|
| 216 | + return $this; |
|
| 217 | + } |
|
| 218 | + |
|
| 219 | + /** |
|
| 220 | + * |
|
| 221 | + * @param Ward $ward |
|
| 222 | + */ |
|
| 223 | + public function setWard($ward) { |
|
| 224 | + $this->oddzialId = $ward->id; |
|
| 225 | + return $this; |
|
| 226 | + } |
|
| 227 | + |
|
| 228 | + /** |
|
| 229 | + * getOddzialId |
|
| 230 | + * |
|
| 231 | + * @return oddzialId |
|
| 232 | + */ |
|
| 233 | + public function getNumerHistorii() { |
|
| 234 | + return $this->numerHistorii; |
|
| 235 | + } |
|
| 236 | + |
|
| 237 | + /** |
|
| 238 | + * setOddzialId |
|
| 239 | + * |
|
| 240 | + * @param int $oddzialId |
|
| 241 | + * oddzial id |
|
| 242 | + * |
|
| 243 | + * @return Patient |
|
| 244 | + */ |
|
| 245 | + public function setNumerHistorii($numerHistorii) { |
|
| 246 | + $this->numerHistorii = $numerHistorii; |
|
| 247 | + return $this; |
|
| 248 | + } |
|
| 249 | + |
|
| 250 | + /** |
|
| 251 | + * getPesel |
|
| 252 | + * |
|
| 253 | + * @return pesel |
|
| 254 | + */ |
|
| 255 | + public function getPesel() { |
|
| 256 | + return $this->pesel; |
|
| 257 | + } |
|
| 258 | + |
|
| 259 | + /** |
|
| 260 | + * setPesel |
|
| 261 | + * |
|
| 262 | + * @param string $pesel |
|
| 263 | + * nr pesel |
|
| 264 | + * |
|
| 265 | + * @return Patient |
|
| 266 | + */ |
|
| 267 | + public function setPesel($pesel) { |
|
| 268 | + $this->pesel = $pesel; |
|
| 269 | + return $this; |
|
| 270 | + } |
|
| 271 | + |
|
| 272 | + /** |
|
| 273 | + * getKategoriaPacjenta |
|
| 274 | + * |
|
| 275 | + * @return kategoriaPacjenta |
|
| 276 | + */ |
|
| 277 | + public function getKategoriaPacjenta() { |
|
| 278 | + return $this->kategoriaPacjenta; |
|
| 279 | + } |
|
| 280 | + |
|
| 281 | + /** |
|
| 282 | + * setKategoriaPacjenta |
|
| 283 | + * |
|
| 284 | + * @param int $kategoriaPacjenta |
|
| 285 | + * kategoriaPacjenta |
|
| 286 | + * |
|
| 287 | + * @return Patient |
|
| 288 | + */ |
|
| 289 | + public function setKategoriaPacjenta($kategoriaPacjenta) { |
|
| 290 | + $this->kategoriaPacjenta = $kategoriaPacjenta; |
|
| 291 | + return $this; |
|
| 292 | + } |
|
| 293 | + |
|
| 294 | + /** |
|
| 295 | + * getTyp |
|
| 296 | + * |
|
| 297 | + * @return typ |
|
| 298 | + */ |
|
| 299 | + public function getTyp() { |
|
| 300 | + return $this->typ; |
|
| 301 | + } |
|
| 302 | + |
|
| 303 | + /** |
|
| 304 | + * setTyp |
|
| 305 | + * |
|
| 306 | + * @param string $typ |
|
| 307 | + * |
|
| 308 | + * @return \Hospitalplugin\Entities\Patient |
|
| 309 | + */ |
|
| 310 | + public function setTyp($typ) { |
|
| 311 | + $this->typ = $typ; |
|
| 312 | + return $this; |
|
| 313 | + } |
|
| 314 | + |
|
| 315 | + /** |
|
| 316 | + * getUser |
|
| 317 | + */ |
|
| 318 | + public function getUser() { |
|
| 319 | + return $this->user; |
|
| 320 | + } |
|
| 321 | + |
|
| 322 | + /** |
|
| 323 | + * |
|
| 324 | + * @param User $user |
|
| 325 | + */ |
|
| 326 | + public function setUser($user) { |
|
| 327 | + $this->user = $user; |
|
| 328 | + return $this; |
|
| 329 | + } |
|
| 330 | + |
|
| 331 | + /** |
|
| 332 | + * toString |
|
| 333 | + * |
|
| 334 | + * @return string |
|
| 335 | + */ |
|
| 336 | + public function toString() { |
|
| 337 | + $txt = $this->getName (); |
|
| 338 | + $txt .= $this->getPesel (); |
|
| 339 | + $txt .= "id:"; |
|
| 340 | + $txt .= $this->getId (); |
|
| 341 | + $txt .= "oid:"; |
|
| 342 | + $txt .= $this->getOddzialId (); |
|
| 343 | + $txt .= "d:"; |
|
| 344 | + $data = $this->getDataKategoryzacji (); |
|
| 345 | + if ($data instanceof \DateTime) { |
|
| 346 | + $txt .= $this->getDataKategoryzacji ()->format ( "Y-m-d" ); |
|
| 347 | + } else { |
|
| 348 | + $txt .= $this->getDataKategoryzacji (); |
|
| 349 | + } |
|
| 350 | + return $txt; |
|
| 351 | + } |
|
| 352 | + public function __toString() { |
|
| 353 | + return $this->toString (); |
|
| 354 | + } |
|
| 355 | + |
|
| 356 | + /** |
|
| 357 | + * getFields |
|
| 358 | + * |
|
| 359 | + * @return multitype:string |
|
| 360 | + */ |
|
| 361 | + protected static function getFields() { |
|
| 362 | + $fields = array ( |
|
| 363 | + "id", |
|
| 364 | + "name", |
|
| 365 | + "pesel", |
|
| 366 | + "numerHistorii", |
|
| 367 | + "dataKategoryzacji", |
|
| 368 | + "kategoriaPacjenta" |
|
| 369 | + ); |
|
| 370 | + return $fields; |
|
| 371 | + } |
|
| 372 | + |
|
| 373 | + /** |
|
| 374 | + * toDatatablesJSONString |
|
| 375 | + * |
|
| 376 | + * @return string |
|
| 377 | + */ |
|
| 378 | + public function toDatatablesJSONString() { |
|
| 379 | + $return_object_array = [ ]; |
|
| 380 | + $fields = $this->getFields (); |
|
| 381 | + foreach ( $fields as $field ) { |
|
| 382 | + $value = call_user_func ( array ( |
|
| 383 | + $this, |
|
| 384 | + 'get' . $field |
|
| 385 | + ) ); |
|
| 386 | + if ($value instanceof \DateTime) { |
|
| 387 | + $value = $value->format ( 'Y-m-d' ); |
|
| 388 | + } |
|
| 389 | + array_push ( $return_object_array, array ( |
|
| 390 | + $field => $value |
|
| 391 | + ) ); |
|
| 392 | + } |
|
| 393 | + return json_encode ( $this ); |
|
| 394 | + } |
|
| 395 | + |
|
| 396 | + /** |
|
| 397 | + * String with comma separated values. |
|
| 398 | + * |
|
| 399 | + * @deprecated JSON used |
|
| 400 | + * @param unknown $patient |
|
| 401 | + * |
|
| 402 | + * @return string |
|
| 403 | + */ |
|
| 404 | + public function toDatatablesString() { |
|
| 405 | + $string = ""; |
|
| 406 | + $fields = $this::getFields (); |
|
| 407 | + foreach ( $fields as $field ) { |
|
| 408 | + $value = call_user_func ( array ( |
|
| 409 | + $this, |
|
| 410 | + 'get' . $field |
|
| 411 | + ) ); |
|
| 412 | + if ($value instanceof \DateTime) { |
|
| 413 | + $value = $value->format ( 'Y-m-d' ); |
|
| 414 | + } |
|
| 415 | + $string .= $value . ","; |
|
| 416 | + } |
|
| 417 | + $string = trim ( $string, "," ); |
|
| 418 | + $string = str_replace ( "\n", "", $string ); |
|
| 419 | + return $string; |
|
| 420 | + } |
|
| 421 | 421 | } |