OECD table delivery functions
(This version of the documentation is for the MySQL database version – but generates links for the filemaker pro server 11 version. Description should be updated when mysql database goes public)
The procedure for delivery of datalink table to OECD consists of two functions:
- 1: Generating a new table of datalinks
- 2: Downloading the table as a csv file
The downloaded table is then mailed to OECD using you own normal mailsystem.
Re. 1 Generating new table:
This is implemented in the database controls as tablecontrol group 16 “Generate OECD datalinks table”. (“Tablecontrol” is what the user can choose from in the operations dropdown menu). The database operations uses an extra database table, spinoecd, that is there for this purpose only. The extra table is used to be able to add two columns with static information as required in the OECD delivery description: Database=SPIN and Operation=ADD. These two columns are defined in the table definition with initial values making the database itself doing the proper initialization.
This tablecontrol has two database operations, each defined in the tabletreat table:
- DOSQL function in table spinoecd: TRUNCATE TABLE spinoecd;INSERT INTO spinoecd(cas_no, chemical_name) SELECT cas_no, preferredname FROM spinstof;
- WRAPPER function in table spinoecd: {“sourcefield”:”cas-no”,”targetfield”:”smileshtml”,”pretext”:”<a href=http://www.spin2000.net/spinmyphp/?pid=”,”subtext”:”</a>”}
Re. 2 Downloding datalinks table
This is implemented using the general table download function with the wordpress shortcode for table download:
is_downtable table=”spinoecd” sql=”SELECT db as `DATABASE`, cas_no as CAS_NO, other_no as OTHER_NO, no_type as NO_TYPE, chemical_name as CHEMICAL_NAME, name_type as NAME_TYPE, synonyms as SYNONYMS, synonym_name_type as SYNONYM_NAME_TYPE, smiles as SMILES, doc_title as DOC_TITLE, url as URL, operation as OPERATION from spinoecd” text=”SpinOECD”
Leave a Reply
You must be logged in to post a comment.