Skip to content

Commit

Permalink
UPD: PQHPT form
Browse files Browse the repository at this point in the history
  • Loading branch information
Itskiprotich committed Oct 28, 2024
1 parent fce7702 commit 96bb137
Show file tree
Hide file tree
Showing 17 changed files with 1,187 additions and 147 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Reporter/PqmpsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function add()
];
$report = $this->Pqmps->patchEntity($report, $data);
if ($this->Pqmps->save($report)) {
$this->Flash->success(__('The Poor-Quality Health Products and Technologies has been created'));
$this->Flash->success(__('The PQHPT has been created'));
$this->redirect(array('action' => 'edit', $report->id));
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/Controller/Reporter/SadrsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ public function edit($id = null)
$sadr = $this->Sadrs->patchEntity($sadr, $this->request->getData(), [
'validate' => $validate,
'associated' => [
'Attachments',
'SadrReaction',
'SadrListOfDrugs',
'SadrListOfMedicines'
'Attachments'=>[ 'validate' => $validate],
'SadrReaction'=>[ 'validate' => $validate],
'SadrListOfDrugs'=>[ 'validate' => $validate],
'SadrListOfMedicines'=>[ 'validate' => $validate]
]
]);

Expand Down
2 changes: 1 addition & 1 deletion templates/Manager/Pqmps/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$this->assign('Poor-Quality Health Products and Technologies', 'active');
$this->assign('PQHPT', 'active');
?>


Expand Down
2 changes: 1 addition & 1 deletion templates/Manager/Users/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
?>
</div>
<div class="span4 formbackp" style="padding: 4px;">
<h5>Poor-Quality Health Products and Technologies</h5>
<h5>PQHPT</h5>
<?php
echo '<ol>';
foreach ($pqmps as $pqmp) {
Expand Down
129 changes: 5 additions & 124 deletions templates/Reporter/Pqmps/edit.php
Original file line number Diff line number Diff line change
@@ -1,126 +1,7 @@
<?php
/**
* @var \App\View\AppView $this
* @var \App\Model\Entity\Pqmp $pqmp
* @var string[]|\Cake\Collection\CollectionInterface $users
* @var string[]|\Cake\Collection\CollectionInterface $counties
* @var string[]|\Cake\Collection\CollectionInterface $subCounties
* @var string[]|\Cake\Collection\CollectionInterface $countries
* @var string[]|\Cake\Collection\CollectionInterface $designations
*/
$this->assign('PQHPT', 'active');
?>

<?php
echo $this->element('pqmp/pqmp_edit');
?>
<div class="row">
<aside class="column">
<div class="side-nav">
<h4 class="heading"><?= __('Actions') ?></h4>
<?= $this->Form->postLink(
__('Delete'),
['action' => 'delete', $pqmp->id],
['confirm' => __('Are you sure you want to delete # {0}?', $pqmp->id), 'class' => 'side-nav-item']
) ?>
<?= $this->Html->link(__('List Pqmps'), ['action' => 'index'], ['class' => 'side-nav-item']) ?>
</div>
</aside>
<div class="column-responsive column-80">
<div class="pqmps form content">
<?= $this->Form->create($pqmp) ?>
<fieldset>
<legend><?= __('Edit Pqmp') ?></legend>
<?php
echo $this->Form->control('user_id', ['options' => $users, 'empty' => true]);
echo $this->Form->control('pqmp_id');
echo $this->Form->control('county_id', ['options' => $counties, 'empty' => true]);
echo $this->Form->control('sub_county_id', ['options' => $subCounties, 'empty' => true]);
echo $this->Form->control('country_id', ['options' => $countries, 'empty' => true]);
echo $this->Form->control('designation_id', ['options' => $designations, 'empty' => true]);
echo $this->Form->control('reference_no');
echo $this->Form->control('facility_name');
echo $this->Form->control('facility_code');
echo $this->Form->control('facility_address');
echo $this->Form->control('facility_phone');
echo $this->Form->control('brand_name');
echo $this->Form->control('generic_name');
echo $this->Form->control('batch_number');
echo $this->Form->control('manufacture_date');
echo $this->Form->control('expiry_date', ['empty' => true]);
echo $this->Form->control('receipt_date', ['empty' => true]);
echo $this->Form->control('name_of_manufacturer');
echo $this->Form->control('country_of_origin');
echo $this->Form->control('supplier_name');
echo $this->Form->control('supplier_address');
echo $this->Form->control('product_formulation');
echo $this->Form->control('product_formulation_specify');
echo $this->Form->control('colour_change');
echo $this->Form->control('separating');
echo $this->Form->control('powdering');
echo $this->Form->control('caking');
echo $this->Form->control('moulding');
echo $this->Form->control('odour_change');
echo $this->Form->control('mislabeling');
echo $this->Form->control('incomplete_pack');
echo $this->Form->control('therapeutic_ineffectiveness');
echo $this->Form->control('particulate_matter');
echo $this->Form->control('complaint_other');
echo $this->Form->control('complaint_other_specify');
echo $this->Form->control('complaint_description');
echo $this->Form->control('require_refrigeration');
echo $this->Form->control('product_at_facility');
echo $this->Form->control('returned_by_client');
echo $this->Form->control('stored_to_recommendations');
echo $this->Form->control('other_details');
echo $this->Form->control('comments');
echo $this->Form->control('reporter_name');
echo $this->Form->control('reporter_email');
echo $this->Form->control('reporter_phone');
echo $this->Form->control('contact_number');
echo $this->Form->control('adverse_reaction');
echo $this->Form->control('reaction_comments');
echo $this->Form->control('medication_error');
echo $this->Form->control('emails');
echo $this->Form->control('submitted');
echo $this->Form->control('submitted_date', ['empty' => true]);
echo $this->Form->control('active');
echo $this->Form->control('device');
echo $this->Form->control('copied');
echo $this->Form->control('archived');
echo $this->Form->control('archived_date', ['empty' => true]);
echo $this->Form->control('notified');
echo $this->Form->control('deleted');
echo $this->Form->control('deleted_date', ['empty' => true]);
echo $this->Form->control('medicinal_product');
echo $this->Form->control('blood_products');
echo $this->Form->control('herbal_product');
echo $this->Form->control('medical_device');
echo $this->Form->control('cosmeceuticals');
echo $this->Form->control('product_other');
echo $this->Form->control('product_specify');
echo $this->Form->control('product_vaccine');
echo $this->Form->control('packaging');
echo $this->Form->control('labelling');
echo $this->Form->control('sampling');
echo $this->Form->control('mechanism');
echo $this->Form->control('electrical');
echo $this->Form->control('device_data');
echo $this->Form->control('software');
echo $this->Form->control('environmental');
echo $this->Form->control('failure_to_calibrate');
echo $this->Form->control('results');
echo $this->Form->control('readings');
echo $this->Form->control('cold_chain');
echo $this->Form->control('reporter_date', ['empty' => true]);
echo $this->Form->control('person_submitting');
echo $this->Form->control('reporter_name_diff');
echo $this->Form->control('reporter_designation_diff');
echo $this->Form->control('reporter_email_diff');
echo $this->Form->control('reporter_phone_diff');
echo $this->Form->control('reporter_date_diff', ['empty' => true]);
echo $this->Form->control('assigned_to');
echo $this->Form->control('assigned_by');
echo $this->Form->control('assigned_date', ['empty' => true]);
?>
</fieldset>
<?= $this->Form->button(__('Submit')) ?>
<?= $this->Form->end() ?>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion templates/Reporter/Pqmps/index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$this->assign('Poor-Quality Health Products and Technologies', 'active');
$this->assign('PQHPT', 'active');
?>


Expand Down
2 changes: 1 addition & 1 deletion templates/Reporter/Users/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@

</div>
<div class="span4 formbackp" style="padding: 4px;">
<h5>Poor-Quality Health Products and Technologies</h5>
<h5>PQHPT</h5>
<?php
echo '<ol>';
foreach ($pqmps as $pqmp) {
Expand Down
2 changes: 1 addition & 1 deletion templates/element/aefi/aefi_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// ));
?>
<div class="row-fluid">
<div class="span10 formbacka">
<div class="span10 formbacka" style="padding: 10px;">

<?php
echo $this->Form->control('id', array());
Expand Down
63 changes: 63 additions & 0 deletions templates/element/help/product_problems.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<div class="row-fluid">
<div class="span12">
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree" name="downloadPDF">
EXPLANATORY NOTES
</a>
</div>
<div id="collapseThree" class="accordion-body collapse">
<div class="accordion-inner">
<!-- Headings & Paragraph Copy -->
<div class="row-fluid">
<div class="span12">
EXPLANATION FOR PRODUCT PROBLEMS FOR MEDICAL DEVICES AND DIAGNOSTICS
• Packaging – damaged, defective, suspect tampered
• Labelling– insufficient instructions for use, illegible
• Sampling – device doesn’t collect/transfer specimen
• Liquid – leak, splash
• Mechanical – misalignment, jam
• Electrical - unable to charge, power loss or fluctuation
• Data – capture, display, or storage affecting product functionality
• Software – network, program, algorithm, or security affecting product functionality
• Environmental – noise, temperature, humidity/ moisture, fungal/bacterial growth, or dust affecting product functionality
• Failure to calibrate
• Results- Increased rate of invalid or unreturnable test results
• Reading-Obviously incorrect, inadequate or imprecise result or readings, Unable to obtain reading
</div>
</div>
</div>
</div>
</div>
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" id="assessment4" href="#collapseFour" name="downloadPDF">
HOW TO RESIZE A PHOTO
</a>
</div>
<div id="collapseFour" class="accordion-body collapse">
<div class="accordion-inner">
<div class="row-fluid">
<div class="span12">
<h3>How to Resize a Photo:</h3>
<p><i class="icon-ok"></i> Right click the picture you want to save and open with `Microsoft office picture manager`.</p>
<p><i class="icon-ok"></i> Click on `Edit Pictures` and on the panel that appears on the left, click on `resize`</p>
<p><i class="icon-ok"></i> Select predefined width x height</p>
<p><i class="icon-ok"></i> In the drop down options, select the option `Web Large (640 x 480 px)` and click on ok</p>
<p><i class="icon-ok"></i> Save a copy of the resized photo (using `save as` option) and upload thenew copy</p>
</div>
</div>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div><!--/span-->
</div><!--/row-->
2 changes: 1 addition & 1 deletion templates/element/menus/manager_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
);
?>
</li>
<li class="<?php echo $this->fetch('Poor-Quality Health Products and Technologies') ?>">
<li class="<?php echo $this->fetch('PQHPT') ?>">
<?php
echo $this->Html->link(
'<i class="fa fa-medkit" aria-hidden="true"></i> PQHPTs',
Expand Down
2 changes: 1 addition & 1 deletion templates/element/menus/reporter_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
array('controller' => 'aefis', 'action'=>'index', 'prefix'=>'Reporter' ), array('escape' => false ));
} ?>
</li>
<li class="<?php echo $this->fetch('Poor-Quality Health Products and Technologies') ?>">
<li class="<?php echo $this->fetch('PQHPT') ?>">
<?php
if($this->request->getSession()->read('Auth.User.health_program')!="Cancer/Oncology program"){
echo $this->Html->link('<i class="fa fa-medkit" aria-hidden="true"></i> PQHPTs',
Expand Down
Loading

0 comments on commit 96bb137

Please sign in to comment.