Class Express
The Express class parses the express script and extract the containing data to the database.
The Express tool provides a powerful scripting language for inserting rubrics from repertories for example in book form into the OpenHomeopath database.
Category: Homeopathy
Copyright: 2007-2014 Henri Schumacher
License: GNU Affero General Public License v3
Author: Henri Schumacher <henri.hulski@gazeta.pl>
Located at include/classes/express_class.php
public
|
|
private
|
#
create_temporary_express_tables( )
create_temporary_express_tables creates the temporary tables, which hold the information from the express-script. |
private
|
#
parse_express_script( string $sym_rem )
parse_express_script parses the submitted script and insert the data in the temporary tables. |
private
integer
|
#
extract_symptom( string $symptom_string )
extract_symptom extracts the symptoms from the symptom string of a parsed record and insert them in the express_symptoms table |
private
|
#
extract_remedies( string $rem_string, integer $symt_id, integer $nonclassic )
extract_remedies extracts the remedies from the remedy string of a parsed record and insert them in the express_sym_rem table |
public
|
#
extract_alias( string $alias_string )
extract_alias extract the alias if the record is an alias record |
private
|
#
extract_source( string $source_string, integer $primary_src )
extract_source extract the source or reference if the record is an source or reference record |
public
|
#
insert_remedy( integer $sympt_id, integer $sym_id, string $current_user, integer $is_duplicated_symptom )
insert_remedy retrieve the remedy records from the express_sym_rem table and insert in or update the sym_rem table |
public
string
|
#
build_select_duplicated_symptoms_query( string $symptom, array & $symptom1_similar_ar, array & $symptom2_similar_ar )
build_select_duplicated_symptoms_query builds the select query to select the record that can be similar to the record inserted |
private
boolean
|
#
similar_words( string $string, string $compare_string )
similar_words compare two strings and return true if the strings are similar, otherwise false |
private
array
|
#
build_clean_words_array( string $string )
build_clean_words_array builds a word array for comparison from a given string and filter the words with a blacklist and whitelist |
public
string
|
#
build_possible_duplication_table( resource $result )
build_possible_duplication_table builds an HTML table for displaying possible dublications of symptoms |
public
string
|
$script | "" |
#
The output in the scripting textarea containing the previous sent records prepared for correction |
public
string
|
$src_id | "" |
#
The ID of the source from which we're inserting the rubrics. |
public
string
|
$src_lang | "" |
#
The ID of the source language |
public
integer
|
$rubric_id | -1 |
#
The ID of the main rubric from which we're inserting rubrics. |
public
string
|
$rubric_name | "" |
#
The name of the main rubric in the language of the source. |
public
array
|
$ref_not_found_ar | array() |
#
Array with given references which were not found in the sources table |
public
array
|
$rem_error_ar | array() |
#
Array of remedy-backups from given remedy abbreviations which were not found in the remedies or alias table. |
public
array
|
$count_ar | array() |
#
Array of different counters (details see the class constructor) |