FAQ

From PHP-EMS-Tools

Revision as of 16:25, 2 October 2007 by Jantman (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

PHP EMS Tools FAQ (as of version 3.0):

Contents

General

I already have HTML_QuickForm2 installed. Do I need another copy?

No. You can remove the related files and directories that were in the archive and replace them with symlinks to your existing files (assuming your web server/PHP installation will follow symlinks for includes). The files to be replaced in the top-level directory of the archive are Common.php, PEAR.php, QuickForm.php and the directory HTML.

Administration

I setup an administrative user, but it won't let me change something.

In the database, all administrative users should have a rightsLevel of 2. If your administrative user doesn't seem to be acting the way it should (or if someone else edited your user and dropped your rights), please check in MySQL that your user has rightsLevel == 2. This should be an integer value.

Schedule

The schedule will not display, and I get an error in the server log reading 'Call to undefined function cal_days_in_month()'

PHP Must be installed with calendar support. You should have compiled with the --enable-calendar flag, or you need to install the php5-calendar package for your OS.

The schedule is just showing blank spots where a member signed on.

From INSTALL.txt:
A side note for the schedule - by default, it displays members using the "ShownAs" field of the roster. When you add new users, this should be added. For the administrator that you created during installation (if you used the install.php script), you will need to go back and edit the ShownAs field (In the Roster Administrative View) in order for the user to show up on the schedule. Alternatively, you can run the admin/makeShownAs.php script to fill in this field for any users that don't have it.
The makeShownAs.php script fills in the ShownAs field for any members who do not have it. It attempts to use the members' last name, if there is only one member with that last name. If there is more than one member with the same last name, it begins using letters from the first name until it gets unique ShownAs entries. For Example:

makeShownAs.php Example
First & Last Name ShownAs
Jason AntmanAntman
Mike SmithMSmith
Kate SmithKSmith
Bob SmithBSmith
Mike JonesMiJones
Matt JonesMaJones

Roster

How do I remove a member?

PHP EMS Tools does not have a facility to permanently remove a member. The idea behind this is that you probably want to keep contact information, hours information, etc. on resigned members as well. By default, members with a type of "Resigned" cannot sign on duty (this is defined in rosterConfig.php file, as the 'canPullDuty' element of the $memberTypes array) and will not be shown in the regular view of the roster. To set a member to "Resigned", go to the Roster Administrative View, click the "Edit" link for the member, and set their Type to "Resigned". If you wish to actually remove all information on the member (i.e. you were just testing), you'll need to do that through MySQL. The basic procedure is to find the member's EMTid and then execute a query like DELETE FROM roster WHERE EMTid="emtid";. If you have any problems, please submit a support request through the Bug Tracking system.

Rig Checks

I want to add more than one rig. How do I do that?

The rig check data is all defined in the rigCheckData.php configuration file. The actual data is stored in the $rigChecks array. The format of this array is:

$rigChecks[X]['name'] = "588";
$rigChecks[X]['data'] = $rigCheckData_1; // if our rigs had things in different places, this array should be different for each rig
$rigChecks[X]['table2start'] = $table2start_1; // this should be different for each rig if the data array is different
$rigChecks[X]['table3start'] = $table3start_1; // and this should be as well

for each rig.

Each index "X" is an integer greater than 1. So if you had three rigs, you would have 1, 2 and 3. If your rigs all have the same items in the same places, you can just copy those four lines and change the index ("X") and the name field.

$rigCheckData_1 refers to an array of the items and titles for the rig check form, setup like:

$rigCheckData_1 = array();
$rigCheckData_1[0]['name'] = 'Exterior Compartment I';
$rigCheckData_1[0]['items'] = array(0 => 'Disaster Packs (3)', 1 => 'Stair Chair', 2 => 'Onboard Oxygen ( > 500 lbs)');
$rigCheckData_1[1]['name'] = 'Exterior Compartment II';
$rigCheckData_1[1]['items'] = array(0 => 'Collars - 2 Adjustable', 1 => 'Pediatric, Baby No-Neck', 2 => 'KED (2)', 3 => 'Add-a-Splint', 4 => 'Head Blocks (2)', 5=> 'Head Beds');

$rigCheckData_1[2]['name'] = 'Exterior Compartment III';
$rigCheckData_1[2]['items'] = array(0 => 'Helmets and Safety Goggles (3)', 1 => 'Work Gloves (3)', 2 => 'Rope', 3 => 'Disposable blankets (3)');
$rigCheckData_1[3]['name'] = 'Exterior Compartment IV';
$rigCheckData_1[3]['items'] = array(0 => 'Backboards w/ Straps (2)', 1 => 'Scoop Stretcher', 2 => 'Reeves (2)');
$rigCheckData_1[4]['name'] = 'Exterior Compartment V';
$rigCheckData_1[4]['items'] = array(0 => 'BVM - Adult(2)', 1 => 'BVM - Child', 2 => 'BVM - Infant', 3 => 'AED - charged, with pads, scissors, razor, gloves', 4 => 'Portable Sunction - charging w/ tubing, Yankauer, Gloves, French', 5=> 'Fire Extinguisher (charged)', 6 => 'MAST Pants', 7 => 'Streamlight (charged)');
$rigCheckData_1[5]['name'] = 'Interior Compartments';
$rigCheckData_1[5]['items'] = array(0 => 'Linens, Cot Sheets, Blankets', 1 => 'Spare Oxygen Tanks (2)', 2 => 'Hi-Con Masks (6)', 3 => 'Nasal Cannulas (6)', 4 => 'Oxygen Supply Tubing (6)', 5 => 'Pedi O2 Masks (6)', 6 => 'Oxygen Wall Unit (working)', 7 => 'Suction Wall Unit (working)', 8 => 'BP Cuff (wall-mounted)', 9 => 'BP Multi-Cuff Unit', 10 => 'Nitrile Gloves (Med & Large)', 11 => 'Anti-Microbial Wipes & Cleaner', 12 => 'Face Masks with Eye Shields', 13 => 'N95 Masks', 14 => 'Gloves (Med. and Large boxes)');
$rigCheckData_1[6]['name'] = "Driver's Seat Rear Compartment";
$rigCheckData_1[6]['items'] = array(0 => 'OB Kit', 1 => 'Assorted Dressings', 2 => 'Cravats', 3 => 'Ice and Hot Packs', 4 => 'Kling, Tape', 5 => 'Water');
$rigCheckData_1[7]['name'] = 'Bench Seat';
$rigCheckData_1[7]['items'] = array(0 => 'CPR Board', 1 => 'Hare Traction', 2 => 'Board Splints', 3 => 'Water Jugs (full) and cups', 4 => 'Empty Garbage Bin', 5 => 'Change Sharps box if needed');
$rigCheckData_1[8]['name'] = 'Jump Kit';
$rigCheckData_1[8]['items'] = array(0 => 'BP Cuff (Adult & Pediatric)', 1 => 'Stethoscope', 2 => 'Gloves, Scissors, Pen Light', 3 => 'Ring Cutter, Seat Belt Cutter', 4 => 'Kling, Ice Packs, Cravats', 5 => 'Tape, Dressings', 6 => 'Oxygen Tank ( > 750 lbs)', 7 => 'Hi-Con Masks (3)', 8 => 'Nasal Cannulas (3)', 9 => 'Pediatric Masks (3)', 10 => 'Supply Tubing (3)', 11 => 'Oral Airways (Assorted)');
$rigCheckData_1[9]['name'] = 'Vehicle';
$rigCheckData_1[9]['items'] = array(0 => 'Fuel (1/2 tank or more)', 1 => 'Portable Radios (Charged & Working)', 2 => 'Warning Lights Working', 3 => 'Siren Working', 4 => 'Wipers / Lights / Backup Alarm', 5 => 'Interior Lighting', 6 => 'Registration / Insurance Card', 7 => 'Street Maps / Directories', 8 => 'Digital Camera & Spare Batteries', 9 => 'Diganostic Tests OK');
$table2start_1 = 5;
$table3start_1 = 8;
// END RIG DATA

Assmung you have multiple rigs, the setup is pretty easy, but long. You'll need to setup a separate array like $rigCheckData_1 for each rig. I recommend naming them like $rigCheckData_1, $rigCheckData_2, and $rigCheckData_3. You'll also need separate variables for $table2start and $table3start, keeping the "_X" naming convention. The tableXstart variables determine where the break between columns 1 and 2, and 2 and 3 occur in terms of the rigCheckData items.

When this is finished, just create separate entries in $rigCheckData for each rig. For three rigs, this would look like:

$rigChecks[1]['name'] = "588";
$rigChecks[1]['data'] = $rigCheckData_1; // if our rigs had things in different places, this array should be different for each rig
$rigChecks[1]['table2start'] = $table2start_1; // this should be different for each rig if the data array is different
$rigChecks[1]['table3start'] = $table3start_1; // and this should be as well
$rigChecks[2]['name'] = "589";
$rigChecks[2]['data'] = $rigCheckData_2; // if our rigs had things in different places, this array should be different for each rig
$rigChecks[2]['table2start'] = $table2start_2; // this should be different for each rig if the data array is different
$rigChecks[3]['table3start'] = $table3start_2; // and this should be as well
$rigChecks[3]['name'] = "otherRigName";
$rigChecks[3]['data'] = $rigCheckData_3; // if our rigs had things in different places, this array should be different for each rig
$rigChecks[3]['table2start'] = $table2start_3; // this should be different for each rig if the data array is different
$rigChecks[X]['table3start'] = $table3start_3; // and this should be as well

Obviously, all of the veriables you reference ($rigCheckData_*, $table2start_*, and $table3start_*) will need to be declared in the file above where you use them in $rigChecks.