diff --git a/src/Controller/FeedbacksController.php b/src/Controller/FeedbacksController.php index ae0089c6e..544dc83a4 100755 --- a/src/Controller/FeedbacksController.php +++ b/src/Controller/FeedbacksController.php @@ -81,11 +81,7 @@ public function add() if ($this->Auth->User('id')) { $this->paginate['limit'] = 5; - $previous_messages = $this->paginate($this->Feedbacks); - // $this->paginate['conditions'] = array('user_id' => $this->Auth->User('id')); - // - // $previous_messages = $this->Feedback->find('all', array('conditions' => array('id' => $this->Auth->User('id')))); - // $previous_messages = $this->paginate(); + $previous_messages = $this->paginate($this->Feedbacks); } $users = $this->Feedbacks->Users->find('list', ['limit' => 200])->all(); $this->set(compact('feedback', 'users')); diff --git a/src/Controller/Manager/AggregatesController.php b/src/Controller/Manager/AggregatesController.php index f19538f3a..0158b71c7 100755 --- a/src/Controller/Manager/AggregatesController.php +++ b/src/Controller/Manager/AggregatesController.php @@ -13,6 +13,9 @@ */ class AggregatesController extends AppController { + + + public $page_options = array('5' => '5', '10' => '10', '25' => '25', '50' => '50', '100' => '100'); /** * Index method * @@ -20,11 +23,16 @@ class AggregatesController extends AppController */ public function index() { + + $limit = $this->request->getQuery('pages', 1000); // Default to 10 if 'pages' is not set + $this->paginate = [ 'contain' => ['Users', 'Counties', 'SubCounties', 'Designations'], - ]; - $aggregates = $this->paginate($this->Aggregates); - + 'limit'=>$limit + + ]; + $aggregates = $this->paginate($this->Aggregates->find('search', ['search' => $this->request->getQuery()])); + $this->set('page_options', $this->page_options); $this->set(compact('aggregates')); } diff --git a/src/Controller/Manager/DrugsController.php b/src/Controller/Manager/DrugsController.php index 461ef2078..4158653ad 100755 --- a/src/Controller/Manager/DrugsController.php +++ b/src/Controller/Manager/DrugsController.php @@ -25,7 +25,15 @@ class DrugsController extends AppController */ public function index() { - $drugs = $this->paginate($this->Drugs); + + $limit = $this->request->getQuery('pages', 1000); // Default to 10 if 'pages' is not set + + $this->paginate = [ + 'contain' => [], + 'limit'=>$limit + + ]; + $drugs = $this->paginate($this->Drugs->find('search', ['search' => $this->request->getQuery()])); $this->set('page_options', $this->page_options); $this->set(compact('drugs')); } diff --git a/src/Controller/Manager/ReportsController.php b/src/Controller/Manager/ReportsController.php index 93d113cb4..4ae5ac7b8 100755 --- a/src/Controller/Manager/ReportsController.php +++ b/src/Controller/Manager/ReportsController.php @@ -6,9 +6,8 @@ use App\Controller\AppController; /** - * Reports Controller - * - * @method \App\Model\Entity\Report[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = []) + * + * */ class ReportsController extends AppController { @@ -19,7 +18,8 @@ class ReportsController extends AppController */ public function index() { - $reports = $this->paginate($this->Reports); + + $reports =[]; $this->set(compact('reports')); } diff --git a/src/Controller/Manager/SaefisController.php b/src/Controller/Manager/SaefisController.php index 445b94545..0ec523960 100755 --- a/src/Controller/Manager/SaefisController.php +++ b/src/Controller/Manager/SaefisController.php @@ -22,22 +22,17 @@ class SaefisController extends AppController */ public function index() { - $criteria = array(); - - // $criteria['Aefis.user_id'] = $this->Auth->user('id'); + + $limit = $this->request->getQuery('pages', 1000); // Default to 10 if 'pages' is not set + $this->paginate = [ - 'contain' => ['Users'], - 'conditions' => $criteria - ]; - $saefis = $this->paginate($this->Saefis); - + 'contain' => [], + 'limit'=>$limit + + ]; + $saefis = $this->paginate($this->Saefis->find('search', ['search' => $this->request->getQuery()])); $this->set('page_options', $this->page_options); $this->set(compact('saefis')); - - // $counties = $this->Saefis->Counties->find('list', array('order' => array('Counties.county_name' => 'ASC'))); - // $this->set(compact('counties')); - // $designations = $this->Saefis->Designations->find('list', array('order' => array('Designations.name' => 'ASC'))); - // $this->set(compact('designations')); } /** diff --git a/src/Controller/Reporter/AefisController.php b/src/Controller/Reporter/AefisController.php index a0384b107..de5322bfa 100755 --- a/src/Controller/Reporter/AefisController.php +++ b/src/Controller/Reporter/AefisController.php @@ -14,7 +14,7 @@ */ class AefisController extends AppController { - + public $page_options = array('25' => '25', '50' => '50', '100' => '100'); /** * Index method diff --git a/src/Model/Table/AggregatesTable.php b/src/Model/Table/AggregatesTable.php index 5a5c80a9e..2a920a60d 100755 --- a/src/Model/Table/AggregatesTable.php +++ b/src/Model/Table/AggregatesTable.php @@ -52,6 +52,9 @@ public function initialize(array $config): void $this->setPrimaryKey('id'); $this->addBehavior('Timestamp'); + $this->addBehavior('Search.Search'); + $this->searchManager() + ->value('retention_status'); $this->belongsTo('Users', [ 'foreignKey' => 'user_id', diff --git a/src/Model/Table/DrugsTable.php b/src/Model/Table/DrugsTable.php index b9fa8d9c7..c50cc86b0 100755 --- a/src/Model/Table/DrugsTable.php +++ b/src/Model/Table/DrugsTable.php @@ -1,4 +1,5 @@ setPrimaryKey('id'); $this->addBehavior('Timestamp'); + $this->addBehavior('Search.Search'); + + $this->searchManager() + ->value('retention_status') + ->value('donation') + ->value('manufacturer') + ->value('brand_name') + ->value('batch_number') + ->value('registration_status') + ->value('inn_name'); } /** diff --git a/src/Model/Table/SaefisTable.php b/src/Model/Table/SaefisTable.php index bb4234507..b46246cf5 100755 --- a/src/Model/Table/SaefisTable.php +++ b/src/Model/Table/SaefisTable.php @@ -1,4 +1,5 @@ setPrimaryKey('id'); $this->addBehavior('Timestamp'); + $this->addBehavior('Search.Search'); + $this->searchManager() + ->value('retention_status'); $this->belongsTo('Users', [ 'foreignKey' => 'user_id', diff --git a/templates/Manager/Aggregates/index.php b/templates/Manager/Aggregates/index.php index 3ecdb8d76..6d8dc797c 100755 --- a/templates/Manager/Aggregates/index.php +++ b/templates/Manager/Aggregates/index.php @@ -1,154 +1,3 @@ $aggregates - */ -?> -
- Html->link(__('New Aggregate'), ['action' => 'add'], ['class' => 'button float-right']) ?> -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Paginator->sort('id') ?>Paginator->sort('user_id') ?>Paginator->sort('aggregate_id') ?>Paginator->sort('county_id') ?>Paginator->sort('summary_available') ?>Paginator->sort('sub_county_id') ?>Paginator->sort('designation_id') ?>Paginator->sort('reference_no') ?>Paginator->sort('messageid') ?>Paginator->sort('assigned_to') ?>Paginator->sort('assigned_by') ?>Paginator->sort('company_code') ?>Paginator->sort('company_name') ?>Paginator->sort('reporter_email') ?>Paginator->sort('e2b_type') ?>Paginator->sort('e2b_file') ?>Paginator->sort('dir') ?>Paginator->sort('size') ?>Paginator->sort('type') ?>Paginator->sort('assigned_date') ?>Paginator->sort('signature') ?>Paginator->sort('submitted') ?>Paginator->sort('submitted_date') ?>Paginator->sort('reporter_name') ?>Paginator->sort('reporter_designation') ?>Paginator->sort('reporter_phone') ?>Paginator->sort('reporter_date') ?>Paginator->sort('person_submitting') ?>Paginator->sort('reporter_name_diff') ?>Paginator->sort('reporter_designation_diff') ?>Paginator->sort('reporter_email_diff') ?>Paginator->sort('reporter_phone_diff') ?>Paginator->sort('reporter_date_diff') ?>Paginator->sort('resubmit') ?>Paginator->sort('status') ?>Paginator->sort('active') ?>Paginator->sort('copied') ?>Paginator->sort('archived') ?>Paginator->sort('archived_date') ?>Paginator->sort('created') ?>Paginator->sort('modified') ?>Paginator->sort('action_date') ?>Paginator->sort('deleted') ?>Paginator->sort('deleted_date') ?>Paginator->sort('brand_name') ?>Paginator->sort('inn_name') ?>Paginator->sort('mah') ?>Paginator->sort('local_technical') ?>Paginator->sort('therapeutic_group') ?>Paginator->sort('authorised_indications') ?>Paginator->sort('form_strength') ?>Paginator->sort('interval_code') ?>Paginator->sort('submission_frequency') ?>Paginator->sort('reminder_date') ?>Paginator->sort('report_type') ?>Paginator->sort('manager_initiated') ?>Paginator->sort('manager_submitted') ?>
Number->format($aggregate->id) ?>has('user') ? $this->Html->link($aggregate->user->name, ['controller' => 'Users', 'action' => 'view', $aggregate->user->id]) : '' ?>aggregate_id === null ? '' : $this->Number->format($aggregate->aggregate_id) ?>has('county') ? $this->Html->link($aggregate->county->id, ['controller' => 'Counties', 'action' => 'view', $aggregate->county->id]) : '' ?>summary_available) ?>has('sub_county') ? $this->Html->link($aggregate->sub_county->id, ['controller' => 'SubCounties', 'action' => 'view', $aggregate->sub_county->id]) : '' ?>has('designation') ? $this->Html->link($aggregate->designation->name, ['controller' => 'Designations', 'action' => 'view', $aggregate->designation->id]) : '' ?>reference_no) ?>messageid) ?>assigned_to === null ? '' : $this->Number->format($aggregate->assigned_to) ?>assigned_by === null ? '' : $this->Number->format($aggregate->assigned_by) ?>company_code) ?>company_name) ?>reporter_email) ?>e2b_type) ?>e2b_file) ?>dir) ?>size) ?>type) ?>assigned_date) ?>signature) ?>submitted === null ? '' : $this->Number->format($aggregate->submitted) ?>submitted_date) ?>reporter_name) ?>reporter_designation === null ? '' : $this->Number->format($aggregate->reporter_designation) ?>reporter_phone) ?>reporter_date) ?>person_submitting) ?>reporter_name_diff) ?>reporter_designation_diff === null ? '' : $this->Number->format($aggregate->reporter_designation_diff) ?>reporter_email_diff) ?>reporter_phone_diff) ?>reporter_date_diff) ?>resubmit) ?>status) ?>active === null ? '' : $this->Number->format($aggregate->active) ?>copied === null ? '' : $this->Number->format($aggregate->copied) ?>archived === null ? '' : $this->Number->format($aggregate->archived) ?>archived_date) ?>created) ?>modified) ?>action_date) ?>deleted) ?>deleted_date) ?>brand_name) ?>inn_name) ?>mah) ?>local_technical) ?>therapeutic_group) ?>authorised_indications) ?>form_strength) ?>interval_code === null ? '' : $this->Number->format($aggregate->interval_code) ?>submission_frequency) ?>reminder_date) ?>report_type) ?>manager_initiated) ?>manager_submitted) ?> - Html->link(__('View'), ['action' => 'view', $aggregate->id]) ?> - Html->link(__('Edit'), ['action' => 'edit', $aggregate->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $aggregate->id], ['confirm' => __('Are you sure you want to delete # {0}?', $aggregate->id)]) ?> -
-
-
- -

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

-
-
+$this->assign('AGGREGATE', 'active'); +echo $this->element('aggregates/aggregates_index'); diff --git a/templates/Manager/Ce2bs/index.php b/templates/Manager/Ce2bs/index.php index f6607b2e2..61e3054dc 100755 --- a/templates/Manager/Ce2bs/index.php +++ b/templates/Manager/Ce2bs/index.php @@ -1,178 +1,6 @@ $ce2bs - */ + $this->assign('E2B', 'active'); + echo $this->element('ce2b/ce2b_index'); ?> -
- Html->link(__('New Ce2b'), ['action' => 'add'], ['class' => 'button float-right']) ?> -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Paginator->sort('id') ?>Paginator->sort('user_id') ?>Paginator->sort('ce2b_id') ?>Paginator->sort('vigiflow_message') ?>Paginator->sort('vigiflow_date') ?>Paginator->sort('report_type') ?>Paginator->sort('county_id') ?>Paginator->sort('sub_county_id') ?>Paginator->sort('designation_id') ?>Paginator->sort('reference_no') ?>Paginator->sort('messageid') ?>Paginator->sort('assigned_to') ?>Paginator->sort('assigned_by') ?>Paginator->sort('company_code') ?>Paginator->sort('company_name') ?>Paginator->sort('reporter_email') ?>Paginator->sort('e2b_type') ?>Paginator->sort('e2b_file') ?>Paginator->sort('dir') ?>Paginator->sort('size') ?>Paginator->sort('type') ?>Paginator->sort('assigned_date') ?>Paginator->sort('signature') ?>Paginator->sort('submitted') ?>Paginator->sort('submitted_date') ?>Paginator->sort('reporter_name') ?>Paginator->sort('reporter_designation') ?>Paginator->sort('reporter_phone') ?>Paginator->sort('reporter_date') ?>Paginator->sort('person_submitting') ?>Paginator->sort('reporter_name_diff') ?>Paginator->sort('reporter_designation_diff') ?>Paginator->sort('reporter_email_diff') ?>Paginator->sort('reporter_phone_diff') ?>Paginator->sort('reporter_date_diff') ?>Paginator->sort('resubmit') ?>Paginator->sort('status') ?>Paginator->sort('active') ?>Paginator->sort('copied') ?>Paginator->sort('archived') ?>Paginator->sort('archived_date') ?>Paginator->sort('created') ?>Paginator->sort('modified') ?>Paginator->sort('action_date') ?>Paginator->sort('deleted') ?>Paginator->sort('deleted_date') ?>Paginator->sort('report_reference') ?>Paginator->sort('creation_time') ?>Paginator->sort('sender_reference') ?>Paginator->sort('receiver_id') ?>Paginator->sort('sender_id') ?>Paginator->sort('sender_unique_identifier') ?>Paginator->sort('worldwide_identifier') ?>Paginator->sort('date_first_received') ?>Paginator->sort('date_most_recent_info') ?>Paginator->sort('serious') ?>Paginator->sort('patient_name') ?>Paginator->sort('patient_sex') ?>Paginator->sort('patient_dob') ?>Paginator->sort('patient_number') ?>Paginator->sort('sender_address') ?>Paginator->sort('sender_city') ?>Paginator->sort('sender_state') ?>Paginator->sort('sender_department') ?>Paginator->sort('sender_organization') ?>Paginator->sort('results_in_detah') ?>Paginator->sort('life_threatening') ?>Paginator->sort('prolonged_hospitalization') ?>Paginator->sort('incapacitating') ?>
Number->format($ce2b->id) ?>has('user') ? $this->Html->link($ce2b->user->name, ['controller' => 'Users', 'action' => 'view', $ce2b->user->id]) : '' ?>ce2b_id === null ? '' : $this->Number->format($ce2b->ce2b_id) ?>vigiflow_message) ?>vigiflow_date) ?>report_type) ?>has('county') ? $this->Html->link($ce2b->county->id, ['controller' => 'Counties', 'action' => 'view', $ce2b->county->id]) : '' ?>has('sub_county') ? $this->Html->link($ce2b->sub_county->id, ['controller' => 'SubCounties', 'action' => 'view', $ce2b->sub_county->id]) : '' ?>has('designation') ? $this->Html->link($ce2b->designation->name, ['controller' => 'Designations', 'action' => 'view', $ce2b->designation->id]) : '' ?>reference_no) ?>messageid) ?>assigned_to === null ? '' : $this->Number->format($ce2b->assigned_to) ?>assigned_by === null ? '' : $this->Number->format($ce2b->assigned_by) ?>company_code) ?>company_name) ?>reporter_email) ?>e2b_type) ?>e2b_file) ?>dir) ?>size) ?>type) ?>assigned_date) ?>signature) ?>submitted === null ? '' : $this->Number->format($ce2b->submitted) ?>submitted_date) ?>reporter_name) ?>reporter_designation === null ? '' : $this->Number->format($ce2b->reporter_designation) ?>reporter_phone) ?>reporter_date) ?>person_submitting) ?>reporter_name_diff) ?>reporter_designation_diff === null ? '' : $this->Number->format($ce2b->reporter_designation_diff) ?>reporter_email_diff) ?>reporter_phone_diff) ?>reporter_date_diff) ?>resubmit) ?>status) ?>active === null ? '' : $this->Number->format($ce2b->active) ?>copied === null ? '' : $this->Number->format($ce2b->copied) ?>archived === null ? '' : $this->Number->format($ce2b->archived) ?>archived_date) ?>created) ?>modified) ?>action_date) ?>deleted) ?>deleted_date) ?>report_reference) ?>creation_time) ?>sender_reference) ?>receiver_id) ?>sender_id) ?>sender_unique_identifier) ?>worldwide_identifier) ?>date_first_received) ?>date_most_recent_info) ?>serious) ?>patient_name) ?>patient_sex) ?>patient_dob) ?>patient_number) ?>sender_address) ?>sender_city) ?>sender_state) ?>sender_department) ?>sender_organization) ?>results_in_detah) ?>life_threatening) ?>prolonged_hospitalization) ?>incapacitating) ?> - Html->link(__('View'), ['action' => 'view', $ce2b->id]) ?> - Html->link(__('Edit'), ['action' => 'edit', $ce2b->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $ce2b->id], ['confirm' => __('Are you sure you want to delete # {0}?', $ce2b->id)]) ?> -
-
-
- -

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

-
-
+ + diff --git a/templates/Manager/Saefis/index.php b/templates/Manager/Saefis/index.php index 0394f808b..4f4d5c69a 100755 --- a/templates/Manager/Saefis/index.php +++ b/templates/Manager/Saefis/index.php @@ -1,344 +1,7 @@ $saefis - */ + $this->assign('Serious Adverse Event Following Immunization', 'active'); ?> -
- Html->link(__('New Saefi'), ['action' => 'add'], ['class' => 'button float-right']) ?> -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Paginator->sort('id') ?>Paginator->sort('user_id') ?>Paginator->sort('saefi_id') ?>Paginator->sort('initial_id') ?>Paginator->sort('messageid') ?>Paginator->sort('vigiflow_ref') ?>Paginator->sort('vigiflow_date') ?>Paginator->sort('webradr_ref') ?>Paginator->sort('webradr_date') ?>Paginator->sort('province_id') ?>Paginator->sort('district') ?>Paginator->sort('aefi_report_ref') ?>Paginator->sort('name_of_vaccination_site') ?>Paginator->sort('reference_no') ?>Paginator->sort('assigned_to') ?>Paginator->sort('assigned_by') ?>Paginator->sort('assigned_date') ?>Paginator->sort('place_vaccination') ?>Paginator->sort('place_vaccination_other') ?>Paginator->sort('site_type') ?>Paginator->sort('site_type_other') ?>Paginator->sort('vaccination_in') ?>Paginator->sort('vaccination_in_other') ?>Paginator->sort('reporter_name') ?>Paginator->sort('report_date') ?>Paginator->sort('start_date') ?>Paginator->sort('complete_date') ?>Paginator->sort('designation_id') ?>Paginator->sort('telephone') ?>Paginator->sort('mobile') ?>Paginator->sort('reporter_email') ?>Paginator->sort('patient_name') ?>Paginator->sort('gender') ?>Paginator->sort('patient_address') ?>Paginator->sort('date_of_birth') ?>Paginator->sort('age_at_onset_years') ?>Paginator->sort('age_at_onset_months') ?>Paginator->sort('age_at_onset_days') ?>Paginator->sort('age_group') ?>Paginator->sort('symptom_date') ?>Paginator->sort('hospitalization_date') ?>Paginator->sort('status_on_date') ?>Paginator->sort('died_date') ?>Paginator->sort('autopsy_done') ?>Paginator->sort('autopsy_done_date') ?>Paginator->sort('autopsy_planned') ?>Paginator->sort('autopsy_planned_date') ?>Paginator->sort('past_history') ?>Paginator->sort('adverse_event') ?>Paginator->sort('allergy_history') ?>Paginator->sort('comorbidity_disorder') ?>Paginator->sort('covid_positive') ?>Paginator->sort('existing_illness') ?>Paginator->sort('hospitalization_history') ?>Paginator->sort('medication_vaccination') ?>Paginator->sort('faith_healers') ?>Paginator->sort('family_history') ?>Paginator->sort('pregnant') ?>Paginator->sort('pregnant_weeks') ?>Paginator->sort('breastfeeding') ?>Paginator->sort('infant') ?>Paginator->sort('birth_weight') ?>Paginator->sort('delivery_procedure') ?>Paginator->sort('source_examination') ?>Paginator->sort('source_documents') ?>Paginator->sort('source_verbal') ?>Paginator->sort('source_other') ?>Paginator->sort('examiner_name') ?>Paginator->sort('person_details') ?>Paginator->sort('person_designation') ?>Paginator->sort('person_date') ?>Paginator->sort('when_vaccinated') ?>Paginator->sort('vaccine_given') ?>Paginator->sort('prescribing_error') ?>Paginator->sort('vaccine_unsterile') ?>Paginator->sort('vaccine_condition') ?>Paginator->sort('vaccine_reconstitution') ?>Paginator->sort('vaccine_handling') ?>Paginator->sort('vaccine_administered') ?>Paginator->sort('vaccinated_vial') ?>Paginator->sort('vaccinated_session') ?>Paginator->sort('vaccinated_locations') ?>Paginator->sort('vaccinated_cluster') ?>Paginator->sort('vaccinated_cluster_number') ?>Paginator->sort('vaccinated_cluster_vial') ?>Paginator->sort('vaccinated_cluster_vial_number') ?>Paginator->sort('syringes_used') ?>Paginator->sort('syringes_used_specify') ?>Paginator->sort('syringes_used_other') ?>Paginator->sort('injection_dose_route') ?>Paginator->sort('injection_time_mentioned') ?>Paginator->sort('injection_no_touch') ?>Paginator->sort('injection_contraindications') ?>Paginator->sort('injection_reported') ?>Paginator->sort('injection_vaccines') ?>Paginator->sort('injection_vaccines_yes') ?>Paginator->sort('reconstitution_multiple') ?>Paginator->sort('reconstitution_different') ?>Paginator->sort('reconstitution_vial') ?>Paginator->sort('reconstitution_syringe') ?>Paginator->sort('reconstitution_vaccines') ?>Paginator->sort('cold_temperature') ?>Paginator->sort('cold_temperature_deviation') ?>Paginator->sort('procedure_followed') ?>Paginator->sort('other_items') ?>Paginator->sort('partial_vaccines') ?>Paginator->sort('unusable_vaccines') ?>Paginator->sort('unusable_diluents') ?>Paginator->sort('cold_transportation') ?>Paginator->sort('vaccine_carrier') ?>Paginator->sort('coolant_packs') ?>Paginator->sort('similar_events') ?>Paginator->sort('similar_events_episodes') ?>Paginator->sort('affected_vaccinated') ?>Paginator->sort('affected_not_vaccinated') ?>Paginator->sort('affected_unknown') ?>Paginator->sort('created') ?>Paginator->sort('modified') ?>Paginator->sort('action_date') ?>Paginator->sort('submitted') ?>Paginator->sort('resubmit') ?>Paginator->sort('submitted_date') ?>Paginator->sort('report_type') ?>Paginator->sort('status') ?>Paginator->sort('active') ?>Paginator->sort('emails') ?>Paginator->sort('signature') ?>Paginator->sort('deleted') ?>Paginator->sort('copied') ?>Paginator->sort('archived') ?>Paginator->sort('archived_date') ?>Paginator->sort('reporter_phone') ?>Paginator->sort('reporter_date') ?>Paginator->sort('person_submitting') ?>Paginator->sort('reporter_name_diff') ?>Paginator->sort('reporter_designation_diff') ?>Paginator->sort('reporter_email_diff') ?>Paginator->sort('reporter_phone_diff') ?>Paginator->sort('reporter_date_diff') ?>Paginator->sort('patient_phone') ?>Paginator->sort('patient_street_name') ?>Paginator->sort('syringes_used_other_specify') ?>Paginator->sort('vaccinator_training') ?>Paginator->sort('description_of_reaction') ?>Paginator->sort('name_of_person_first_treated') ?>Paginator->sort('name_of_the_person_treating') ?>Paginator->sort('other_source_of_info') ?>Paginator->sort('patient_house_number') ?>Paginator->sort('time_of_first_symptom') ?>Paginator->sort('vaccine_name') ?>Paginator->sort('date_first_reported') ?>Paginator->sort('date_form_filled') ?>
Number->format($saefi->id) ?>has('user') ? $this->Html->link($saefi->user->name, ['controller' => 'Users', 'action' => 'view', $saefi->user->id]) : '' ?>saefi_id === null ? '' : $this->Number->format($saefi->saefi_id) ?>initial_id === null ? '' : $this->Number->format($saefi->initial_id) ?>messageid) ?>vigiflow_ref) ?>vigiflow_date) ?>webradr_ref) ?>webradr_date) ?>province_id === null ? '' : $this->Number->format($saefi->province_id) ?>district) ?>aefi_report_ref) ?>name_of_vaccination_site) ?>reference_no) ?>assigned_to === null ? '' : $this->Number->format($saefi->assigned_to) ?>assigned_by === null ? '' : $this->Number->format($saefi->assigned_by) ?>assigned_date) ?>place_vaccination) ?>place_vaccination_other) ?>site_type) ?>site_type_other) ?>vaccination_in) ?>vaccination_in_other) ?>reporter_name) ?>report_date) ?>start_date) ?>complete_date) ?>has('designation') ? $this->Html->link($saefi->designation->name, ['controller' => 'Designations', 'action' => 'view', $saefi->designation->id]) : '' ?>telephone) ?>mobile) ?>reporter_email) ?>patient_name) ?>gender) ?>patient_address) ?>date_of_birth) ?>age_at_onset_years === null ? '' : $this->Number->format($saefi->age_at_onset_years) ?>age_at_onset_months === null ? '' : $this->Number->format($saefi->age_at_onset_months) ?>age_at_onset_days === null ? '' : $this->Number->format($saefi->age_at_onset_days) ?>age_group) ?>symptom_date) ?>hospitalization_date) ?>status_on_date) ?>died_date) ?>autopsy_done) ?>autopsy_done_date) ?>autopsy_planned) ?>autopsy_planned_date) ?>past_history) ?>adverse_event) ?>allergy_history) ?>comorbidity_disorder) ?>covid_positive) ?>existing_illness) ?>hospitalization_history) ?>medication_vaccination) ?>faith_healers) ?>family_history) ?>pregnant) ?>pregnant_weeks) ?>breastfeeding) ?>infant) ?>birth_weight === null ? '' : $this->Number->format($saefi->birth_weight) ?>delivery_procedure) ?>source_examination) ?>source_documents) ?>source_verbal) ?>source_other) ?>examiner_name) ?>person_details) ?>person_designation) ?>person_date) ?>when_vaccinated) ?>vaccine_given) ?>prescribing_error) ?>vaccine_unsterile) ?>vaccine_condition) ?>vaccine_reconstitution) ?>vaccine_handling) ?>vaccine_administered) ?>vaccinated_vial === null ? '' : $this->Number->format($saefi->vaccinated_vial) ?>vaccinated_session === null ? '' : $this->Number->format($saefi->vaccinated_session) ?>vaccinated_locations === null ? '' : $this->Number->format($saefi->vaccinated_locations) ?>vaccinated_cluster) ?>vaccinated_cluster_number === null ? '' : $this->Number->format($saefi->vaccinated_cluster_number) ?>vaccinated_cluster_vial) ?>vaccinated_cluster_vial_number === null ? '' : $this->Number->format($saefi->vaccinated_cluster_vial_number) ?>syringes_used) ?>syringes_used_specify) ?>syringes_used_other) ?>injection_dose_route) ?>injection_time_mentioned) ?>injection_no_touch) ?>injection_contraindications) ?>injection_reported) ?>injection_vaccines) ?>injection_vaccines_yes) ?>reconstitution_multiple) ?>reconstitution_different) ?>reconstitution_vial) ?>reconstitution_syringe) ?>reconstitution_vaccines) ?>cold_temperature) ?>cold_temperature_deviation) ?>procedure_followed) ?>other_items) ?>partial_vaccines) ?>unusable_vaccines) ?>unusable_diluents) ?>cold_transportation) ?>vaccine_carrier) ?>coolant_packs) ?>similar_events) ?>similar_events_episodes === null ? '' : $this->Number->format($saefi->similar_events_episodes) ?>affected_vaccinated === null ? '' : $this->Number->format($saefi->affected_vaccinated) ?>affected_not_vaccinated === null ? '' : $this->Number->format($saefi->affected_not_vaccinated) ?>affected_unknown) ?>created) ?>modified) ?>action_date) ?>Number->format($saefi->submitted) ?>resubmit) ?>submitted_date) ?>report_type) ?>status) ?>active === null ? '' : $this->Number->format($saefi->active) ?>emails === null ? '' : $this->Number->format($saefi->emails) ?>signature) ?>deleted === null ? '' : $this->Number->format($saefi->deleted) ?>copied === null ? '' : $this->Number->format($saefi->copied) ?>archived === null ? '' : $this->Number->format($saefi->archived) ?>archived_date) ?>reporter_phone) ?>reporter_date) ?>person_submitting) ?>reporter_name_diff) ?>reporter_designation_diff) ?>reporter_email_diff) ?>reporter_phone_diff) ?>reporter_date_diff) ?>patient_phone) ?>patient_street_name) ?>syringes_used_other_specify) ?>vaccinator_training) ?>description_of_reaction) ?>name_of_person_first_treated) ?>name_of_the_person_treating) ?>other_source_of_info) ?>patient_house_number) ?>time_of_first_symptom) ?>vaccine_name) ?>date_first_reported) ?>date_form_filled) ?> - Html->link(__('View'), ['action' => 'view', $saefi->id]) ?> - Html->link(__('Edit'), ['action' => 'edit', $saefi->id]) ?> - Form->postLink(__('Delete'), ['action' => 'delete', $saefi->id], ['confirm' => __('Are you sure you want to delete # {0}?', $saefi->id)]) ?> -
-
-
- -

Paginator->counter(__('Page {{page}} of {{pages}}, showing {{current}} record(s) out of {{count}} total')) ?>

-
-
+ +element('saefi/saefi_index'); +?> \ No newline at end of file diff --git a/templates/element/aggregates/aggregates_index.php b/templates/element/aggregates/aggregates_index.php new file mode 100644 index 000000000..918058a9e --- /dev/null +++ b/templates/element/aggregates/aggregates_index.php @@ -0,0 +1,334 @@ +assign('AGGREGATE', 'active'); +?> + +
+
+ Html->link( + ' New Report', + array('controller' => 'aggregates', 'action' => 'add'), + array('escape' => false, 'class' => 'btn btn-success') + ); + } + ?> +

Aggregate Reports: Filter, Search, and view reports + +

+
+
+
+ +
+
+ Form->create(null, ['valueSources' => 'query']); + ?> + + + + + + + + + + + + + + + + + + + + + + + +
+ Form->control( + 'reference_no', + array( + 'div' => false, + 'placeholder' => 'aggregates/2023', + 'class' => 'span12', + 'label' => array('class' => 'required', 'text' => 'Reference No.') + ) + ); + ?> + + Form->control( + 'company_name', + array( + 'div' => false, + 'placeholder' => '', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Company Name ') + ) + ); + ?> + + Form->control( + 'reporter_email', + array( + 'div' => false, + 'placeholder' => '', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Reporter Email ') + ) + ); + ?> + + Form->control( + 'start_date', + array( + 'div' => false, + 'type' => 'text', + 'class' => 'control-small unauthorized_index', + 'after' => '-to-', + 'label' => array('class' => 'required', 'text' => 'Report Dates'), + 'placeHolder' => 'Start Date' + ) + ); + echo $this->Form->control( + 'end_date', + array( + 'div' => false, + 'type' => 'text', + 'class' => 'control-small unauthorized_index', + 'after' => ' + clear!', + 'label' => false, + 'placeHolder' => 'End Date' + ) + ); + ?> +
+ Form->control( + 'brand_name', + array( + 'div' => false, + 'placeholder' => '', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Brand Name ') + ) + ); + ?> + + Form->control( + 'inn_name', + array( + 'div' => false, + 'placeholder' => '', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Inn Name ') + ) + ); + ?> + + Form->control( + 'submission_frequency', + array( + 'div' => false, + 'class' => 'span12', + 'label' => array('class' => 'required submission_frequency', 'text' => 'Submission Frequency '), + 'type' => 'select', + 'empty' => true, + 'options' => array( + '0' => 'Monthly', + '1' => 'Yearly' + ) + ) + ); + ?> +
+ Form->control('pages', array( + 'type' => 'select', + 'div' => false, + 'class' => 'control-small', + 'empty' => true, + 'options' => $page_options, + 'label' => false, + )); + ?> + + + + Form->button(' Search', array( + 'escapeTitle' => false, + 'class' => 'btn btn-primary', + 'div' => 'control-group', + 'div' => false, + 'formnovalidate' => 'formnovalidate', + 'style' => array('margin-bottom: 5px') + )); + ?> + + Html->link(' Clear', array('action' => 'index'), array('class' => 'btn', 'escape' => false, 'style' => array('margin-bottom: 5px'))); + ?> + + Html->link(' Excel', array('action' => 'index', 'ext' => 'csv', '?' => $this->request->query), array('class' => 'btn btn-success', 'escape' => false)); + ?> +
+

+ Paginator->counter( + __('Page {{page}} of {{pages}}, + showing {{current}} PBRERs out of + {{count}} total, starting on record {{start}}, + ending on {{end}}') + ); + ?> +

+ Form->end(); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id'); ?>Paginator->sort('reference_no'); ?>Paginator->sort('brand_name'); ?>Paginator->sort('inn_name'); ?>Paginator->sort('reporter_email'); ?>Paginator->sort('created'); ?>Paginator->sort('date_submitted'); ?>
  + Html->link($aggregate['reference_no'], array('action' => 'view', $aggregate['id']), array('escape' => false)); + ?>  + Text->truncate($aggregate['brand_name'], 42); + if ($aggregate['report_type'] == 'Followup') { + echo "
Initial: "; + echo $this->Html->link( + '', + array('action' => 'view', $aggregate['aggregate_id']), + array('escape' => false) + ); + } + ?>  +
     + 1) { + echo $this->Html->link( + ' View ', + array('controller' => 'aggregates', 'action' => 'view', $aggregate['id']), + array('escape' => false) + ); + echo " "; + if ($prefix == 'reporter' and $this->request->getSession()->read('Auth.User.user_type') != 'Public Health Program') echo $this->Form->postLink(' Followup ', array('controller' => 'aggregates', 'action' => 'followup', $aggregate['id']), array('escape' => false), __('Add a followup report?')); + + + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $aggregate['user_id'] == $this->request->getSession()->read('Auth.User.id')) echo $this->Form->postLink(' Followup ', array('controller' => 'aggregates', 'action' => 'followup', $aggregate['id']), array('escape' => false), __('Add a followup report?')); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $aggregate['copied'] == 2) echo $this->Html->link( + ' Edit ', + array('controller' => 'aggregates', 'action' => 'edit', $aggregate['id']), + array('escape' => false) + ); + echo " "; + // if (($prefix == 'manager' || $prefix == 'reviewer') && $aggregate['copied'] == 0) echo $this->Form->postLink(' Copy ', array('controller' => 'aggregates', 'action' => 'copy', $aggregate['id']), array('escape' => false), __('Create a clean copy to edit?')); + if (($prefix == 'manager' || $prefix == 'reviewer')) echo $this->Html->link( + ' Archive ', + array('controller' => 'aggregates', 'action' => 'archive', $aggregate['id']), + array('escape' => false), + __('Are you sure you want to archive the report?') + ); + } else { + if ($prefix == 'reporter') echo $this->Html->link( + ' Edit ', + array('controller' => 'aggregates', 'action' => 'edit', $aggregate['id']), + array('escape' => false) + ); + echo " "; + if (($prefix == 'reporter' || $prefix == 'manager') && $aggregate['submitted'] == 0) { + echo " "; + echo $this->Form->postLink(' Delete ', array('controller' => 'aggregates', 'action' => 'delete', $aggregate['id']), array('escape' => false), __('Are you sure you want to delete this report? + Note: This action cannot be undone.')); + } + echo " "; + if ($prefix == 'manager' || $prefix == 'reviewer') echo $this->Html->link( + ' View ', + array('controller' => 'aggregates', 'action' => 'view', $aggregate['id']), + array('escape' => false) + ); + } + ?> +
+
+
+ + + \ No newline at end of file diff --git a/templates/element/ce2b/ce2b_index.php b/templates/element/ce2b/ce2b_index.php new file mode 100644 index 000000000..f1a42791f --- /dev/null +++ b/templates/element/ce2b/ce2b_index.php @@ -0,0 +1,362 @@ +assign('E2B', 'active'); +?> + +
+
+ Html->link( + ' New E2b', + array('controller' => 'ce2bs', 'action' => 'add'), + array('escape' => false, 'class' => 'btn btn-success') + ); + } + ?> +

E2b Reports: Filter, Search, and view reports + +

+
+
+
+ +
+
+ Form->create(null, ['valueSources' => 'query']); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Form->control( + 'reference_no', + array( + 'div' => false, + 'placeholder' => 'e2b/2023', + 'class' => 'span12', + 'label' => array('class' => 'required', 'text' => 'Reference No.') + ) + ); + ?> + + Form->control( + 'company_name', + array( + 'div' => false, + 'placeholder' => '', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Company Name ') + ) + ); + ?> + + Form->control( + 'reporter_email', + array( + 'div' => false, + 'placeholder' => '', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Reporter Email ') + ) + ); + ?> + + Form->control( + 'start_date', + array( + 'div' => false, + 'type' => 'text', + 'class' => 'control-small unauthorized_index', + 'after' => '-to-', + 'label' => array('class' => 'required', 'text' => 'Report Dates'), + 'placeHolder' => 'Start Date' + ) + ); + echo $this->Form->control( + 'end_date', + array( + 'div' => false, + 'type' => 'text', + 'class' => 'control-small unauthorized_index', + 'after' => ' + clear!', + 'label' => false, + 'placeHolder' => 'End Date' + ) + ); + ?> +
+ Form->control( + 'drug_name', + array( + 'div' => false, + 'placeholder' => 'drug name', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Drug Name') + ) + ); + ?> + +
Serious?
+ Form->control('serious', array( + 'options' => array('1' => 'Yes', '0' => 'No'), + 'legend' => false, + 'type' => 'radio', + 'label' => false + )); + ?> +
+ Form->control( + 'inn', + array('div' => false, 'placeholder' => 'Brand Name', 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Brand Name')) + ); + ?> + + Form->control( + 'sender_unique_identifier', + array('div' => false, 'placeholder' => 'eg KE-xx', 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Sender Identifier')) + ); + ?> + + Form->control( + 'sender_organization', + array('div' => false, 'placeholder' => 'Sender\'s Org', 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Sender\'s Organization')) + ); + ?> + + +
+ Form->control('pages', array( + 'type' => 'select', + 'div' => false, + 'class' => 'control-small', + // 'selected' => $this->request->params['paging']['limit'], + 'empty' => true, + // 'options' => $page_options, + 'label' => false, + )); + ?> + + + + Form->button(' Search', array( + 'escapeTitle' => false, + 'class' => 'btn btn-primary', + 'div' => 'control-group', + 'div' => false, + 'formnovalidate' => 'formnovalidate', + 'style' => array('margin-bottom: 5px') + )); + ?> + + Html->link(' Clear', array('action' => 'index'), array('class' => 'btn', 'escape' => false, 'style' => array('margin-bottom: 5px'))); + ?> + + Html->link(' Excel', array('action' => 'index', 'ext' => 'csv', '?' => $this->request->query), array('class' => 'btn btn-success', 'escape' => false)); + ?> +
+

+ Paginator->counter( + __('Page {{page}} of {{pages}}, + showing {{current}} Ce2bs out of + {{count}} total, starting on record {{start}}, + ending on {{end}}') + ); + ?> +

+ Form->end(); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id'); ?>Paginator->sort('reference_no'); ?>Paginator->sort('company_name'); ?>Paginator->sort('reporter_email'); ?>Paginator->sort('e2b_file_type'); ?>Paginator->sort('created'); ?>Paginator->sort('submitted_date', 'Date Submitted'); ?>
  + 1) { + echo $this->Html->link($ce2b['reference_no'], array('action' => 'view', $ce2b['id']), array('escape' => false, 'class' => 'text-' . ((isset($ce2b['serious']) && $ce2b['serious'] == '1') ? 'error' : 'success'))); + } else { + echo $this->Html->link($ce2b['reference_no'], array('action' => (($prefix == 'reporter') ? 'edit' : 'view'), $ce2b['id']), array('escape' => false, 'class' => 'text-' . ((isset($ce2b['serious']) && $ce2b['serious'] == '1') ? 'error' : 'success'))); + } + ?>  + Initial: "; + echo $this->Html->link( + '', + array('action' => 'view', $ce2b['ce2b_id']), + array('escape' => false) + ); + } + + + ?>      + 1) { + echo $this->Html->link( + ' View ', + array('controller' => 'ce2bs', 'action' => 'view', $ce2b['id']), + array('escape' => false) + ); + echo " "; + if ($prefix == 'reporter' and $this->request->getSession()->read('Auth.User.user_type') != 'Public Health Program') echo $this->Form->postLink(' Followup ', array('controller' => 'ce2bs', 'action' => 'followup', $ce2b['id']), array('escape' => false), __('Add a followup report?')); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer')) echo $this->Form->postLink(' 2 ', array('controller' => 'ce2bs', 'action' => 'download', $ce2b['id'], 'ext' => 'xml', 'manager' => false), array('escape' => false), __('Download E2B?')); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && empty($ce2b['vigiflow_ref']) && $ce2b['copied'] == 2) echo $this->Html->link( + ' Vigiflow ', + array('controller' => 'ce2bs', 'action' => 'vigiflow', $ce2b['id'], 'manager' => false), + array('escape' => false) + ); + + //Create a follow up as a manager + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $ce2b['user_id'] == $this->request->getSession()->read('Auth.User.id')) echo $this->Form->postLink(' Followup ', array('controller' => 'ce2bs', 'action' => 'followup', $ce2b['id']), array('escape' => false), __('Add a followup report?')); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $ce2b['copied'] == 2) echo $this->Html->link( + ' Edit ', + array('controller' => 'ce2bs', 'action' => 'edit', $ce2b['id']), + array('escape' => false) + ); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $ce2b['copied'] == 0) echo $this->Form->postLink(' Copy ', array('controller' => 'ce2bs', 'action' => 'copy', $ce2b['id']), array('escape' => false), __('Create a clean copy to edit?')); + + echo " "; + echo $this->Html->link( + ' PDF ', + array('controller' => 'ce2bs', 'action' => 'view', 'ext' => 'pdf', $ce2b['id']), + array('escape' => false) + ); + if (($prefix == 'manager' || $prefix == 'reviewer')) { + echo $this->Html->link( + ' Archive ', + array('controller' => 'ce2bs', 'action' => 'archive', $ce2b['id']), + array('escape' => false), + __('Are you sure you want to archive the report?') + ); + } + + // PDF Download + + } else { + if ($prefix == 'reporter') echo $this->Html->link( + ' Edit ', + array('controller' => 'ce2bs', 'action' => 'edit', $ce2b['id']), + array('escape' => false) + ); + echo " "; + if (($prefix == 'reporter' || $prefix == 'manager') && $ce2b['submitted'] == 0) { + echo " "; + echo $this->Form->postLink(' Delete ', array('controller' => 'ce2bs', 'action' => 'delete', $ce2b['id']), array('escape' => false), __('Are you sure you want to delete this report? + Note: This action cannot be undone.')); + } + echo " "; + if ($prefix == 'manager' || $prefix == 'reviewer') echo $this->Html->link( + ' View ', + array('controller' => 'ce2bs', 'action' => 'view', $ce2b['id']), + array('escape' => false) + ); + } + ?> +
+
+
+ + + \ No newline at end of file diff --git a/templates/element/drugs/index.php b/templates/element/drugs/index.php index b1bd247ff..4124bacf2 100755 --- a/templates/element/drugs/index.php +++ b/templates/element/drugs/index.php @@ -4,7 +4,7 @@
- +
Form->create(); - // 'Drug', array( - // 'url' => array_merge(array('action' => 'index'), $this->params['pass']), - // 'class' => 'ctr-groups', 'style' => array('padding:9px;', 'background-color: #F5F5F5'), - // )); + echo $this->Form->create(null, ['valueSources' => 'query']); ?> @@ -42,7 +38,8 @@ 'brand_name', array( 'div' => false, - 'class' => 'span12', 'label' => array('class' => 'required', 'text' => 'Brand Name') + 'class' => 'span12', + 'label' => array('class' => 'required', 'text' => 'Brand Name') ) ); ?> @@ -53,7 +50,8 @@ 'inn_name', array( 'div' => false, - 'class' => 'unauthorized_index span10', 'label' => array('class' => 'required', 'text' => 'INN Name') + 'class' => 'unauthorized_index span10', + 'label' => array('class' => 'required', 'text' => 'INN Name') ) ); ?> @@ -64,7 +62,8 @@ 'batch_number', array( 'div' => false, - 'class' => 'span12', 'label' => array('class' => 'required', 'text' => 'Batch Number') + 'class' => 'span12', + 'label' => array('class' => 'required', 'text' => 'Batch Number') ) ); ?> @@ -75,7 +74,8 @@ 'manufacturer', array( 'div' => false, - 'class' => 'span12', 'label' => array('class' => 'required', 'text' => 'Manufacturer') + 'class' => 'span12', + 'label' => array('class' => 'required', 'text' => 'Manufacturer') ) ); ?> @@ -93,7 +93,8 @@ 'registration_status', array( 'div' => false, - 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Registration Status') + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Registration Status') ) ); ?> @@ -104,7 +105,8 @@ 'retention_status', array( 'div' => false, - 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Retention Status') + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Retention Status') ) ); ?> @@ -115,7 +117,8 @@ 'donation', array( 'div' => false, - 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Donation') + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Donation') ) ); ?> @@ -136,8 +139,10 @@
Form->control('pages', array( - 'type' => 'select', 'div' => false, 'class' => 'control-small', - // 'selected' => $this->request->params['paging']['limit'], + 'type' => 'select', + 'div' => false, + 'class' => 'control-small', + // 'selected' => $this->request->params['paging']['limit'], 'empty' => true, 'options' => $page_options, 'label' => false, @@ -150,8 +155,10 @@ Form->button(' Search', array( - 'escapeTitle'=>false, - 'class' => 'btn btn-primary', 'div' => 'control-group', 'div' => false, + 'escapeTitle' => false, + 'class' => 'btn btn-primary', + 'div' => 'control-group', + 'div' => false, 'formnovalidate' => 'formnovalidate', 'style' => array('margin-bottom: 5px') )); @@ -170,27 +177,27 @@

Paginator->counter( - __('Page {{page}} of {{pages}}, + echo $this->Paginator->counter( + __('Page {{page}} of {{pages}}, showing {{current}} Drugs out of {{count}} total, starting on record {{start}}, ending on {{end}}') - ); + ); ?>

Form->end(); ?> - +
@@ -209,20 +216,20 @@ - - - - - - - - - - - - - + + + + + + + + + + + + +
Paginator->sort('id'); ?>
           
           
diff --git a/templates/element/saefi/saefi_index.php b/templates/element/saefi/saefi_index.php new file mode 100644 index 000000000..494881dac --- /dev/null +++ b/templates/element/saefi/saefi_index.php @@ -0,0 +1,398 @@ +assign('SAEFI', 'active'); +?> + +
+
+ + +
+
+ +
+
+ + +
+
+
+

Serious Adverse Event Following Immunization: Filter, Search, and view reports

+
+
+
+
+ + Form->create(null, ['valueSources' => 'query']); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Form->control( + 'reference_no', + array( + 'div' => false, + 'placeholder' => 'saefi/2020', + 'class' => 'span12', + 'label' => array('class' => 'required', 'text' => 'Reference No.') + ) + ); + ?> + + + + Form->control( + 'start_date', + array( + 'div' => false, + 'type' => 'text', + 'class' => 'control-small unauthorized_index', + 'after' => '-to-', + 'label' => array('class' => 'required', 'text' => 'Report Dates'), + 'placeHolder' => 'Start Date' + ) + ); + echo $this->Form->control( + 'end_date', + array( + 'div' => false, + 'type' => 'text', + 'class' => 'control-small unauthorized_index', + 'after' => ' + clear!', + 'label' => false, + 'placeHolder' => 'End Date' + ) + ); + ?> + + + + + + Form->control( + 'county_id', + array( + 'div' => false, + 'empty' => true, + 'class' => 'control-small', + 'label' => array('class' => 'required', 'text' => 'County') + ) + ); + ?> +
+ + + + + + + + + + + +
+ request->getSession()->read('Auth.User.user_type') != 'Public Health Program') echo $this->Form->control( + 'patient_name', + array( + 'div' => false, + 'placeholder' => 'Patient name', + 'class' => 'span12 unauthorized_index', + 'label' => array('class' => 'required', 'text' => 'Patient Name') + ) + ); + ?> + +
Report Type?
+ Form->control('report_type', array( + 'options' => array('Initial' => 'Initial', 'Followup' => 'Followup'), + 'legend' => false, + 'type' => 'radio', + 'label' => false, + )); + ?> +
+ + + + + Form->control( + 'reporter', + array('div' => false, 'class' => 'span12 unauthorized_index', 'label' => array('class' => 'required', 'text' => 'Reporter'), 'placeholder' => 'Name/Email') + ); + ?> + + Form->control( + 'designation_id', + array( + 'div' => false, + 'empty' => true, + 'class' => 'control-small', + 'label' => array('class' => 'required', 'text' => 'Designation') + ) + ); + ?> + +
Gender
+ Form->control('gender', array( + 'options' => array('Male' => 'Male', 'Female' => 'Female', 'Unknown' => 'Unknown'), + 'legend' => false, + 'type' => 'radio', + 'label' => false, + )); + ?> +
+
Report Status
+ Form->control('submitted', array( + 'options' => array('1' => 'UnSubmitted', '2' => 'Submitted'), + 'legend' => false, + 'type' => 'radio', + 'label' => false, + )); + ?> +
Form->control('health_program', array( + 'type' => 'select', + 'options' => [ + 'Malaria program' => 'Malaria program', + 'National Vaccines and immunisation program' => 'National Vaccines and immunisation program', + 'Neglected tropical diseases program' => 'Neglected tropical diseases program', + 'MNCAH Priority Medicines' => 'MNCAH Priority Medicines', + 'TB program' => 'TB program', + 'NASCOP program' => 'NASCOP program', + 'Cancer/Oncology program' => 'Cancer/Oncology program' + ], + 'empty' => true, + 'label' => array('class' => 'control-label', 'text' => 'Public Health Program'), + 'class' => 'control-xlarge' + )); ?> +
+ Form->control('pages', array( + 'type' => 'select', + 'div' => false, + 'class' => 'control-small', + 'empty' => true, + 'options' => $page_options, + 'label' => false, + )); + ?> + + + + Form->button(' Search', array( + 'escapeTitle' => false, + 'class' => 'btn btn-primary', + 'div' => 'control-group', + 'div' => false, + 'formnovalidate' => 'formnovalidate', + 'style' => array('margin-bottom: 5px') + )); + ?> + + Html->link(' Clear', array('action' => 'index'), array('class' => 'btn', 'escape' => false, 'style' => array('margin-bottom: 5px'))); + ?> + + Html->link(' Excel', array('action' => 'index', 'ext' => 'csv', '?' => $this->request->query), array('class' => 'btn btn-success', 'escape' => false)); + ?> +
+

+ Paginator->counter( + __('Page {{page}} of {{pages}}, + showing {{current}} Saefis out of + {{count}} total, starting on record {{start}}, + ending on {{end}}') + ); + ?> +

+ Form->end(); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Paginator->sort('id'); ?>Paginator->sort('reference_no'); ?>Paginator->sort('report_type'); ?>request->getSession()->read('Auth.User.user_type') != 'Public Health Program') ? $this->Paginator->sort('patient_name') : $this->Paginator->sort('gender'); ?>Paginator->sort('reporter_date', 'Date reported'); ?>Paginator->sort('created', 'Date created'); ?>Paginator->sort('submitted_date', 'Date Submitted'); ?>
  + 1) { + echo $this->Html->link($aefi['reference_no'], array('action' => 'view', $aefi['id']), array('escape' => false, 'class' => 'text-' . ((isset($aefi['serious']) && $aefi['serious'] == 'Yes') ? 'error' : 'success'))); + } else { + echo $this->Html->link($aefi['reference_no'], array('action' => (($prefix == 'reporter') ? 'edit' : 'view'), $aefi['id']), array('escape' => false, 'class' => 'text-' . ((isset($aefi['serious']) && $aefi['serious'] == 'Yes') ? 'error' : 'success'))); + } + ?>  Initial: "; + echo $this->Html->link( + '', + array('action' => 'view', $aefi['aefi_id']), + array('escape' => false) + ); + } + ?>  + request->getSession()->read('Auth.User.user_type') != 'Public Health Program') ? h($aefi['patient_name']) : $aefi['gender']; ?>     + 1) { + echo $this->Html->link( + ' View ', + array('controller' => 'saefis', 'action' => 'view', $aefi['id']), + array('escape' => false) + ); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $aefi['copied'] == 2) echo $this->Html->link( + ' Edit ', + array('controller' => 'saefis', 'action' => 'edit', $aefi['id']), + array('escape' => false) + ); + echo " "; + if (($prefix == 'manager' || $prefix == 'reviewer') && $aefi['copied'] == 0) echo $this->Form->postLink(' Copy ', array('controller' => 'saefis', 'action' => 'copy', $aefi['id']), array('escape' => false), __('Create a clean copy to edit?')); + echo $this->Html->link( + ' Archive ', + array('controller' => 'saefis', 'action' => 'archive', $aefi['id']), + array('escape' => false), + __('Are you sure you want to archive the report?') + ); + } else { + if ($prefix == 'reporter' and $this->request->getSession()->read('Auth.User.user_type') != 'Public Health Program') echo $this->Html->link( + ' Edit ', + array('controller' => 'saefis', 'action' => 'edit', $aefi['id']), + array('escape' => false) + ); + } + + + echo " "; + echo $this->Html->link( + ' PDF ', + array('action' => 'view', 'ext' => 'pdf', $aefi['id']), + array('escape' => false) + ); + // Check if the user is a reporter and the report is not submitted + if (($prefix == 'reporter' || $prefix == 'manager') && $aefi['submitted'] == 0 && $this->request->getSession()->read('Auth.User.user_type') != 'Public Health Program') { + echo " "; + echo $this->Form->postLink(' Delete ', array('controller' => 'saefis', 'action' => 'delete', $aefi['id']), array('escape' => false), __('Are you sure you want to delete this report? + Note: This action cannot be undone.')); + } + ?> +
+
+
+ + \ No newline at end of file