Extension:Mccp

 "MCCP" stands for "Metrology & Configuration Control Portal" 

What can this extension do?
Adds a collection of Special Pages which provide web-access to an external "Metrology & Configuration Control" database. These special pages allows for the secure, online management of equipment with special attention to:
 * Systems and Subsystems
 * Multiple facilities, sites, buildings, rooms and location nomenclature
 * Calibration and calibration recall cycles and histories
 * Association and tracking of procedures and checklists
 * Technical print ECO (engineering change order) Tracking
 * Instrument Lists for Testing
 * and, my favorite, (SRS) System Readiness Status tracking



=Introduction= Unless you are using an expensive proprietary software package, metrology and configuration control data is traditionally then tracked using a stand-alone database file which is carefully maintained by a single user. While this approach is simple, it is time consuming and lacks many of the modern accessibility features which are increasingly common to proprietary solutions. It is also highly prone to errors due to a lack of an adequate input checks nor does it provide the ability to review a time-history log of changes.

So the goal of 'this' extension is to keep the approach of an external database file as an end-product, but to utilize the highly-popular MediaWiki software as a ready-to go, feature-rich, user-based website to facilitate a simple web-portal from which to use features like, user-authentication and list export for the metrology database. This approach has many advantages, primarily, the ability to use the facilities/organizations preexisting network domain in order to validate users and assign permissions which allow users to view and update the Metrology database from a web-page as determined by the wiki administrator.

Important Caveat
The extent to which this extension works on any platform other than a WAMP server is completely unknown to the author.

It is also important to state that this is a work in progress and is provided As-Is.
 * please report all bugs and feature requests in the appropriate sections below.

MediaWiki Mechanics
This extension will have you install:
 * 1) A custom skin (required! - I will be working to eliminate this as a requirement soon.)
 * 2) A collection of special pages in the wiki extensions folder
 * 3) Additional folders which will be installed outside the wiki folder path
 * 4) A "System DNS" ODBC connection on the wiki server system (ADODB is a planed upgrade)
 * 5) The popular "wGET" executable
 * 6) A PHP PEAR Extension for generating MS-Excel spreadsheets.

=Extension Details=

Requirements

 * 1) A WAMP Server equivalent to "Web-developer version 2.0"
 * (http://sourceforge.net/project/showfiles.php?group_id=187164)
 * 1) Mediawiki (latest version)
 * (http://www.mediawiki.org/wiki/Download)
 * 1) wGet
 * (http://en.wikipedia.org/wiki/Wget)
 * (I got the Windows binary here: http://users.ugent.be/~bpuype/wget/#download)
 * 1) PHP Spreadsheet Express using PEAR
 * (http://pear.php.net/package/Spreadsheet_Excel_Writer/)

Usage
see the FAQs and Manual below

Download instructions
visit: http://www.mavericks2252.net/archive/mediawiki-extensions/mccp/

and download the latest zip file.

Installation
'''please see my complete installation walk-through on this articles "talk page"
 * here: Extension_talk:Mccp'''

Requested Features


=Personal note from the author= I am a test & measurement scientist/engineer who has been working in the national laboratory and aerospace test facilities environment for more than 12 years now. Between 2002 and 2005 I had a written a stand-alone web-application out of necessity called "Devlore*" which was the predecessor to this extension and served the same purpose. This extension was written to replace the Devlore project (1) http://accelconf.web.cern.ch/AccelConf/ica05/proceedings/pdf/P1_096.pdf By late 2005 I had realized that although the Metrology functions worked, the monolithic Devlore web-site itself was out-of date and clunky. The value of being able to leverage MediaWiki as a stable, full-featured and highly customizable web-site foundation can not be under-stated. This has eliminated ALL of the burden of developing a website (and shifted strictly to administration of one) and allowed me to focus my programming effort solely on the Metrology and Configuration Control features that I wanted. I would like to extend an enormous "thank-you" to everyone in the MediaWiki development community for their contribution to society that will never fully be appreciated by the vast majority of users that benefit from it. ...That's the way it is, I think, for us engineer's (software or otherwise)...

I hope this extension proves useful to you. Please feel free to contact me about it.

Cheers! - Rich (revansx)

=Quick Start F.A.Q.s (aka Survival Guide)=

How do I... Add a new location?
A location is defined in the MCCP database as the result of four tables which are related in a linear hierarchy to define a unique location in the system. The final location has the following hierarchy: - Site - Building - Room Area An fictional example would be: - "XYZ University" - "Engineering Building" - "Lab 1" - "Rack 3" The location tables are:
 * Table: "B2X_Location_Sites": This is the top level location table and it is basically a simple list of sites (or facilities) that contain structures (or buildings).
 * Table: "B2X_Location_Structures": This table is a list of structures (usually buildings) that contain rooms. Each Structure must reference (or belong to) a pre-defined site from table 1.
 * Table: "B2X_Location_Rooms": This table is a list of rooms that will have specifically identified locations. Each Room must reference (or belong to) a pre-defined structure from table 2.
 * Table: "B2X_Location_List": This table is a list of specifically named locations. Each Location Area that is defined must reference (or belong to) a pre-defined room.
 * Direct Database Method
 * Open the MCCP_Database.mdb file using MS-Access
 * Open the Table named "B2X_Location_Sites" in datasheet view
 * Expand the Site/Facility that your new location belongs to (or add a new site if the one you need does not exist)
 * Expand the Structure/Building that your new location belongs to (or add a new Structure/Building if the one you need does not exist)
 * Expand the Room that your new location belongs to (or add a new room if the one you need does not exist)
 * ADD the new area as a location belonging to the appropriate room.
 * save and close the database
 * visit the special page "Special:MCCP Database - Locations Listing" to rebuild the location list.
 * From the web --- currently you can not add new locations directly from the web

How do I... Add a new System?
Similar to defining locations in the MCCP database, a user's systems are defined in the MCCP database as the product of a linear hierarchy of two tables in the MCCP database. These two systems provide 1) a high-level (or Primary) systems list and 2) a list of sub-systems (or Secondary systems) that belong to the various top-level systems. The "Systems" Hierarchy has the following structure: - Primary System (Top Level System) - Secondary System (Sub-System) An example of a typical system/sub-systems tree would be like: - Safety Systems - Fire Detection System - Low Oxygen System - Inclement Weather Alert System - Paging System/PA System - Personnel Access System - Control Systems - Control PCs - Controls Ethernet - PLCs and Remote I/O controllers - Temperature Sensors - Pressures Sensors - Fluid & Gas Systems - Instrument Air System - Nitrogen Storage System - Infrastructure & Support Systems - HVAC - Telecomm - AC Power/Electrical - City Water System - etc...

Direct Database Method

 * 1) Open the MCCP_Database.mdb file using MS-Access
 * 2) Open the Table named "B2X_Systems_List" in datasheet view
 * 3) Expand the "System" that your new Subsystem belongs to (or add a new top level system if the one you need does not exist)
 * If you decide that you need to add a new top level system, be sure to fill-out the following properties: "System_Name" & "FacilityPrefix". Any other fields are arbitrary.
 * Special Note about "FacilityPrefix" - this field is used as organizational code to control the permissions required to modify an object in the wiki. THIS SHOULD BE A SIMPLE 1-4 LETTER CODE WHICH IDENTIFIES YOUR ORGANIZATION
 * 1) ADD the new subsystem . --- You only need to fill-out the field: "Subsystem_Name". Any other fields are arbitrary.
 * 2) save and close the database
 * 3) visit the special page "Special:MCCP Database - Systems Listing" to rebuild the system list.
 * 4) Note the presense of the new system(s) that you added.

From the Web
--- currently you can not add systems directly from the web

How do I... Add a new Product?
The product catalog in the MCCP database is a combination of four tables which work together to provide all of the information that pertains to products definitions and minimized the duplication of data in the database. The four tables are:
 * 1) B2X_Product_Mfgs - This is a simple list of companies that make the products in your catalog. i.e. a DELL PC Monitor P/N: 1234 would have a manufacturer of "DELL"
 * 2) B2X_Product_Types - This is a list of simple description telling what the product DOES (functionally) i.e. a DELL PC Monitor P/N: 1234 would have a functional description of a "PC Monitor"
 * 3) B2X_Product_Apps - This is a list of application that products are used for. i.e. a DELL PC Monitor P/N: 1234 would have a product application of "Computer Equipment"
 * 4) B2X_Product_List - This is your main list of defined products. Each item in this list will reference a "type", "application" and "Manufacturer" from the lists above. In addition to the information inherited from those lists, the product list will allow you to enumerate the various part numbers, part description and some other data.

'''Once you have a few products created... the easiest way to build the product catalog is using the MCCP special page: "./Special:MCCP_Database_-_Product_Listing"'''

But Before you can start building your Product Catalog, you must build three other lists: 1) A list of product Applications, 2) a list of Product Functions and 3) a list of Product Manufactures.

Direct Database method
Open the MCCP_Database.mdb file using MS-Access
 * 1) First we need to create the defined Product Manufacturer
 * 2) Open the Table named "B2X_Product_Mfgs" in datasheet view
 * At a complete minimum - there MUST be TWO product manufactures defined:
 * 1) One where:
 * Product_MFG_ID = 1 and
 * Product_MFG_Abrv = "Undefined Manufacturer"
 * 1) AND Another where:
 * Product_MFG_ID > 1 and
 * where you must fill in the field Product_MFG_Abrv with some text describing a product type for your first product. i.e. "DELL"
 * 1) Second, we need to create the defined Product Types
 * 2) Open the Table named "B2X_Product_Types" in datasheet view
 * At a complete minimum - there MUST be TWO product types defined:
 * 1) One where:
 * Product_Type_ID = 1 and
 * Product_Type_Text = "Undefined Product Type" and
 * Product_Type_Obj = "undeclared"
 * 1) AND another product type where:
 * Product_Type_ID > 1 and
 * you must fill in the field Product_Type_Text with some text describing a product type for your first product. AND
 * Product_Type_Obj must be one of the objects defined in the table "B2X_Object_Classes"
 * 1) Next, we need to define a few Product Applications
 * 2) Open the Table named "B2X_Product_Apps" in datasheet view
 * At a complete minimum - there MUST be TWO product applications defined:
 * 1) One where:
 * Product_App_ID = 1 and
 * Product_Application_Text = "Undefined Product Application"
 * 1) AND another application entry where:
 * Product_App_ID > 1 and
 * you must fill in the field Product_Application_Text with a statement of what product application your first product is for.
 * 1) Lastly, we are ready to define products in the "Product_List"
 * 2) Open the Table named "B2X_Product_List" in datasheet view
 * At a complete minimum - there MUST be TWO products defined:
 * 1) One where:
 * Product_ID = 1 and
 * Product_App_ID = 1 and
 * Product_MFG_ID = 1 and
 * Product_Type_ID = 1 and
 * MFG_Part_Number = "Unknown Product"
 * 1) And another Product where:
 * Product_ID > 1 (auto-numbered) and
 * Product_MFG_ID > 1 (referencing a Product_MFG_ID from your B2X_Product_Mfgs Table) and
 * Product_App_ID > 1 (referencing a Product_App_ID from your B2X_Product_App Table) and
 * Product_Type_ID > 1 (referencing a Product_Type_ID from your B2X_Product_Type Table) and
 * MFG_Part_Number =  whatever the part number is of the part you are adding.
 * all other fields are optional
 * 1) And another Product where:
 * Product_ID > 1 (auto-numbered) and
 * Product_MFG_ID > 1 (referencing a Product_MFG_ID from your B2X_Product_Mfgs Table) and
 * Product_App_ID > 1 (referencing a Product_App_ID from your B2X_Product_App Table) and
 * Product_Type_ID > 1 (referencing a Product_Type_ID from your B2X_Product_Type Table) and
 * MFG_Part_Number =  whatever the part number is of the part you are adding.
 * all other fields are optional

From the Web

 * 1) Visit the special page: "Special:MCCP_Database_-_Product_Listing"

How do I... Add a new piece of equipment?
The EQUIPMENT (aka Inventory) list in the MCCP database pulls together the information from all of the tables above.


 *  IF AND ONLY IF 
 * you have the Locations List created
 * (...view the special page: "./Special:MCCP_Database_-_Locations_Listing" to confirm it.)
 * and you have the Systems Lists created
 * (...view the special page: "./Special:MCCP_Database_-_Systems_Listing" to confirm it.)
 * and you have the Products Manufactures List created
 * (...view the special page: "./Special:MCCP_Database_-_Manufacturer_Listing" to confirm it.)
 * and you have the Products Types List created
 * (...view the special page: "./Special:MCCP_Database_-_Product_Types_Listing" to confirm it.)
 * and you have the Products Applications created
 * (...view the special page: "./Special:MCCP_Database_-_Product_Applications_Listing" to confirm it.)
 * and you have the Products List created
 * (...view the special page: "./Special:MCCP_Database_-_Product_Listing" to confirm it.)
 *  THEN 
 * '''you are ready to add equipmnet/inventory to your MCCP database.

Direct Database method
If you are ready to define new inventory/equipment in "B2X_Inventory_List" per the requirements stated above"
 * 1) Open the Table named "B2X_Inventory_List" in datasheet view
 * At a complete minimum - there MUST be TWO items defined:
 * 1) One where:
 * Inventory_ID = 1 and
 * Product_ID  = 1 and
 * Location_ID = 1 and
 * LocationB_ID = 1 and
 * AssocSys_ID = 1 and
 * Instrument_ID= 1 and
 * all other fields are optional
 * 1) Additional Items can be added manually where:
 * Inventory_ID > 1 (autonumber) and
 * Product_ID  > 1 (must reference a defined Product from the B2X_Product_List) and
 * Location_ID > 1 (must reference a defined Location from the B2X_Location_List) and
 * LocationB_ID > 1 (must reference a defined Location from the B2X_Location_List) and
 * AssocSys_ID > 1 (must reference a defined System from the B2X_System_List) and
 * Instrument_ID= 1 (this must be ="1") and
 * all other fields are optional
 * all other fields are optional

What is IMTE?
"Instrumentation, Measurement, & Test Equipment" or I.M.T.E  - a subset of which is the IMTE list for items which have a traceable calibration history and will be re-calibrated on a regular basis per mandatory recall.

What is A.I.S.
Alarm, Interlocks, and Shutdown or A.I.S.  equipment is anything required to reliably operate the facility or system to protect capital equipment or personnel safety.

How do save a link to a list?
Okay. so you have this great extension (MCCP) that mines a database and generates these terrific lists... and you have played with the filters to get a specific, targeted list that displays just the columns you want and is sorted in just the right special way... and now you want to make it easy for other to check this list without having to set all the filters on their own... here's what you do.

You can make a shortcut using your web-browser and save it in your favorites and/or send the short-cut to people... OR ... you can save the links as external links in your wiki per the usual way... namely:
 * 1) click on the browser's address bar such that it highlights the FULL URL (make sure you get all the extra stuff beyond the page name... this is where all the list settings are encoded)
 * 2) paste that giant link into the wiki page of you choice
 * 3) save the page
 * 4) direct people to that wiki page with the list URL
 * 5) tell them to click on that link to get the list

Optionally, you can use wiki formatting techniques to make the link more presentable

such as:
 * 1) encapsulate the URL in square-brackets as:
 * if the url is like this:
 * URL=http://localhost/mediawiki/index.php/Special:MCCP_Database_-_Inventory_Listing?&b2xTblPresets=pid...
 * then do this [URL this is my link]

=User Manual= ...to be written