Overview

Packages

  • Admin
  • Archive
  • Common
  • DB
  • Express
  • Form
  • Layout
  • Mailer
  • None
  • OpenHomeoDB
  • PDF
    • MC
  • Process
  • Rep
  • RevRep
  • SaveReps
  • Search
  • Session
  • SymRem
  • TreeView
  • UserDB

Classes

  • Rep
  • Overview
  • Package
  • Class
  • Tree

Class Rep

The Rep class is responsible for the repertorization process including saving and printing the result

Package: Rep
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/rep_class.php
Methods summary
public Rep
# __construct( )

Class constructor

Class constructor

Returns

Rep
private
# get_result_data( )

get_result_data retrieves the repertorization data.

get_result_data retrieves the repertorization data.

get_result_data takes the selected symptoms and retrieves from the database the correspodending remedies and grades and count them.

private
# get_symptoms_ar( )

get_symptoms_ar builds a sorted symptoms array.

get_symptoms_ar builds a sorted symptoms array.

public string
# rep_result_table( )

rep_result_table builds a nicely formatted interactive table from the repertory result.

rep_result_table builds a nicely formatted interactive table from the repertory result.

The first version of the rep_result_table function was written by Thomas Bochmann.

Returns

string
html table from the repertory result
private string
# get_sym_rem_src( integer $sym_id, integer $rem_id, integer & $max_grade, integer & $kuenzli_dot )

get_sym_rem_src returns the sources that exists for a given symptom-remedy-relation.

get_sym_rem_src returns the sources that exists for a given symptom-remedy-relation.

Parameters

$sym_id
integer
$sym_id Symptom ID
$rem_id
integer
$rem_id Remedy ID
$max_grade
integer
&$max_grade The max. grade of the symptom-remedy-relation
$kuenzli_dot
integer
&$kuenzli_dot 0|1 if the symptom-remedy-relation has a Künzli-dot 1 otherwise 0.

Returns

string
public integer
# get_max_grade( integer $sym_id, integer $rem_id )

get_max_grade returns the max. grade of a given symptom-remedy-relation

get_max_grade returns the max. grade of a given symptom-remedy-relation

Parameters

$sym_id
integer
$sym_id Symptom ID
$rem_id
integer
$rem_id Remedy ID

Returns

integer
public
# save_rep( )

Save a repertorization to the database

Save a repertorization to the database

public
# print_PDF( string $task )

print_PDF prints the Repertory result table in an PDF file.

print_PDF prints the Repertory result table in an PDF file.

Parameters

$task
string
$task 'save_PDF'|'print_PDF': if 'save_PDF' the PDF should get downloaded, if 'print_PDF' the PDF should open in the browser
public integer
# date_to_timestamp( string $date )

date_to_timestamp returns an UNIX-timestamp from a given date in German format

date_to_timestamp returns an UNIX-timestamp from a given date in German format

Parameters

$date
string
$date date in German format

Returns

integer
UNIX-timestamp
public string
# date_to_german( string $date )

date_to_german returns the date in German format (DD.MM.YYYY) from a given date in RFC 3339 format (YYYY-MM-DD)

date_to_german returns the date in German format (DD.MM.YYYY) from a given date in RFC 3339 format (YYYY-MM-DD)

Parameters

$date
string
$date date in RFC 3339 format (YYYY-MM-DD)

Returns

string
date in German format (DD.MM.YYYY)
private
# get_table_data( array & $header_ar, array & $first_row_ar, array & $data_ar, string & $summary )

get_table_data retrieves the data for printing the repertorization-result-table in a PDF-file.

get_table_data retrieves the data for printing the repertorization-result-table in a PDF-file.

Parameters

$header_ar
array
&$header_ar holds the table headers
$first_row_ar
array
&$first_row_ar holds the first rows of the result-table
$data_ar
array
&$data_ar holds the rows of the table body
$summary
string
&$summary contains a summary of the repertorization result
Properties summary
public string $rep_id ''
#

Repertorization ID

Repertorization ID

public string $date ''
#

Repertorization date in RFC 3339 format (YYYY-MM-DD)

Repertorization date in RFC 3339 format (YYYY-MM-DD)

public string $patient ''
#

Patient ID

Patient ID

public string $note ''
#

Repertorization note

Repertorization note

public string $prescription ''
#

Prescription

Prescription

public array $sym_select array()
#

Symptom selection array: key: sym_id, value: degree

Symptom selection array: key: sym_id, value: degree

private array $symptoms_ar array()
#

Symptoms array: keys: [id]: symptom ID, [name]: symptom name, [degree]: symptom degree, [kuenzli]: symptom Künzli-dot

Symptoms array: keys: [id]: symptom ID, [name]: symptom name, [degree]: symptom degree, [kuenzli]: symptom Künzli-dot

public array $remedies_ar array()
#

Remedies array: The remedies we found during reperorization: [0] = grade, [1] = hits, [2] = rem_short, [3] = rem_name, [4] = rem_id

Remedies array: The remedies we found during reperorization: [0] = grade, [1] = hits, [2] = rem_short, [3] = rem_name, [4] = rem_id

private array $rel_ar array()
#

Symptom-remedies-relation array - keys: [0] = rem_short, [1] = grade, [2] = sym_id

Symptom-remedies-relation array - keys: [0] = rem_short, [1] = grade, [2] = sym_id

public integer $sym_count
#

Number of found symptoms

Number of found symptoms

public integer $rem_count
#

Number of found remedies

Number of found remedies

public integer $rel_count
#

Number of found symptom-remedies-relations

Number of found symptom-remedies-relations

private string $symptoms_tbl
#

Symptoms table

Symptoms table

private string $sym_rem_tbl
#

Symptom-remedy-relations table

Symptom-remedy-relations table

OpenHomeopath PHP code documentation API documentation generated by ApiGen 2.8.0