GENET GPD data collection configuration set
Change Log (for detailed information, please refer to the manual)
-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v099 -- 2026-04-13 --
------------------------
The patient information template (patient-template.txt) needs to be selected in accordance
with your local standard date format, because it contains a field for the date of birth.

Possible date formats are
	dd/MM/yyyy	-->	DMY_SLASH
	dd.MM.yyyy	-->	DMY_DOT
	dd-MM-yyyy	-->	DMY_DASH
	yyyy-MM-dd	-->	YMD_DASH
	yyyy.MM.dd	-->	YMD_DOT
	MM/dd/yyyy	-->	MDY_SLASH
	
Please use the patient-template.txt from the folder that corresponds to your local date format.
	
Each folder contains the 2 template files that need to be copied to the "user" folder of the local GPD installation:
	- patient-template.txt
	- treatment-template.txt

Also the GENET export template needs to be copied to the "user" folder of the local GPD installation:
- GENET_DB_Export.v099-2-tables.ftl

---------------------------------------------------------------------------
# GENET_DB_Export.v099-2-tables.ftl:
- NEW: the GENET export template works now with the defined set of DATE OF BIRTH date formats.









-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v098 -- 2026-04-02 --
------------------------
- NEW: The set contains 3 folders that should be used depending on local DATE OF BIRTH date format:
	- EU -> DATE OF BIRTH (DD.MM.YYYY)
	- UK -> DATE OF BIRTH (DD/MM/YYYY)
	- US -> DATE OF BIRTH (MM/DD/YYYY)
	
Each folder contains the 2 template files that need to be copied to the "user" folder of the local GPD installation:
	- patient-template.txt
	- treatment-template.txt

Also the GENET export template needs to be copied to the "user" folder of the local GPD installation:
- GENET_DB_Export.v098-2-tables.ftl

---------------------------------------------------------------------------
# GENET_DB_Export.v098-2-tables.ftl:
- NEW: the GENET export template works now with all three DATE OF BIRTH date formats.



-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v097 -- 2026-02-09 --
------------------------
The set contains 3 files that need to be copied to the "user" folder of the local GPD installation:
- patient-template.txt
- treatment-template.txt
- GENET_DB_Export.v097-2-tables.ftl

---------------------------------------------------------------------------
# GENET_DB_Export.v097-2-tables.ftl:
- FIX: template version names were not updated, is now correct: v97


-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v096 -- 2026-01-15 --
------------------------
The set contains 3 files that need to be copied to the "user" folder of the local GPD installation:
- patient-template.txt
- treatment-template.txt
- GENET_DB_Export.v096-2-tables.ftl

---------------------------------------------------------------------------
# GENET_DB_Export.v096-2-tables.ftl:
- FIX: "age_treatment" was calculated incorrectly.
- FIX: template version names were not updated, is now correct: v96


-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v095 -- 2025-11-17 --
------------------------
The set contains 3 files that need to be copied to the "user" folder of the local GPD installation:
- patient-template.txt
- treatment-template.txt
- GENET_DB_Export.v095-2-tables.ftl


# IMPORTANT NOTE: If you are updating from v094, you need to change the edf-export-filename line in "user.prefs":

	Reset the EDF export filename format in the GPD configuration file "user.prefs", which is located in the folder "...\GPD\portable\appdata\GPD\user":
	- close the GPD application!
	- open the file "user.prefs" in a text editor (like notepad, NOT Word!!!)
	- find the line that starts with "edf-export-filename=..."
	- replace the whole line with 
edf-export-filename=${THYMATRON SYSTEM IV S/N}_${PATIENT ID}_${TIMESTAMP}
	- save and close the file


---------------------------------------------------------------------------
# General:
- CHN: The tool to fix the EDF filenames is obsolete, since a more convenient solution was found, which is rolled out with this version.

---------------------------------------------------------------------------
# GENET_DB_Export.v095-2-tables.ftl:
- CHN:	The variable edf_file_name contains now the uniquely identifying part of the correct EDF filename.
		The filename of the actual EDF files is composed by the genet_id and a timestamp.
		This timestamp is the date and time of the treatment as it is also exported in the variable date_of_treatment.
		However, the actual filename contains also the seconds part, which is missing in date_of_treatment,
		and which is thus not available to the export script.
		As viable solution, the variable edf_file_name is now generated during export from the date_of_treatment,
		and the seconds part is simply missing.
		We don't consider this as being a major issue, since the available information in that filename stub is sufficiently
		unique to identify the corresponding EDF files. The date_of_treatment time is set in the beginning,
		when the treatment information is entered, so the date_of_treatment time of an eventual restimulation
		will have a time set many minutes after the time from the first stimulation. A search over the pool of
		EDF files can easily be done by employing wildcards (*) or regular expressions.
		
		As a consequence, the auxillary variable treatment_id will not be exported anymore, since it needed to be removed
		before uploading the treatments to the GENET database.
		
		
GPD field name                                                exported variable name
-------------------------------------------------------------------------------------------------------------------------------------------
TREATMENT COUNTER                                             treatment_id            REMOVED



---------------------------------------------------------------------------
# patient-template.txt
- NOTHING

---------------------------------------------------------------------------
# treatment-template.txt
- CHN:	[EDF FILE NAME] is removed, since the actual EDF-Filename is now generated during export and it is not
		possible to generate it in the template.
		The field [DATE OF TREATMENT] holds the identical information (down to the minute) in case the timestamp of
		an EDF file needs to be known instantly:
		DATE OF TREATMENT: 2025-11-17 12:16   -->   timestamp of EDF file: 202511171216   (with seconds missing)


















-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v094 -- 2025-04-29 --
------------------------
The set contains 3 files that need to be copied to the "user" folder of the local GPD installation:
- patient-template.txt
- treatment-template.txt
- GENET_DB_Export.v094-2-tables.ftl
- subfolder "Fix EDF Filenames"
	- HowTo.txt
	- fixEDF.cmd
	- fix_edf_filenames.ps1

---------------------------------------------------------------------------
# General:
- NEW: A tool to fix the EDF filenames is provided in the subfolder "Fix EDF Filenames", read the HowTo.txt



---------------------------------------------------------------------------
# GENET_DB_Export.v094-2-tables.ftl:
- FIX: Duplicate patient lines in export routine.
- NEW: One exported field was added, see below. 
       * The field 'TREATMENT COUNTER' -> exported column 'treatment_id', will be deleted from the exported CSV
         after generating the correct EDF filenames using the CMD/powershell tool.
         !! The column 'treatment_id' needs to be removed before uploading, if the MD/powershell tool is not used.
- FIX: The REDCap Data Access Group is handled differently than previously communicated,
		so the exported column 'redcap_data_access_group' was removed. 


GPD field name                                                exported variable name
-------------------------------------------------------------------------------------------------------------------------------------------
TREATMENT COUNTER                                             treatment_id            (unique internal treatment index to align EDF files)



---------------------------------------------------------------------------
# patient-template.txt
- NOTHING

---------------------------------------------------------------------------
# treatment-template.txt
- FIX: L111, added Clonidine to drop down 
- FIX: L212, changed EDF file name format from [THYMATRON SERIAL NUMBER]_[PATIENT ID]_[TIMESTAMP] to [PATIENT ID]_[THYMATRON SERIAL NUMBER]_[TIMESTAMP].


















-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v093 -- 2024-10-08 --
------------------------
skipped





















-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- v092 -- 2024-10-08 --
------------------------
The set contains 3 files that need to be copied to the "user" folder of the local GPD installation:
patient-template.txt
treatment-template.txt
GENET_DB_Export.v092-2-tables.ftl

---------------------------------------------------------------------------
# General:
- NEW: An export template "GENET_DB_Export.v092-2-tables.ftl" is provided. This template generates two CSV table files for patient information and treatment data separately. The column structure of these files corresponds to the requirements of the GENET database and can be directly imported.
- NEW: A counter of index series "CURRENT ECT SERIES NUMBER" was introduced to separate instances of series-bound data collections, i.e. clinical, neuro-cognitive data, and treatment data. In case there is knowledge of a patient having received previous ECT index series in other institutions, this can be considered here.
- NEW: As a consequence of this and due to the technical role of the GENET ID as unique identifier in the GENET database, its composition of the GENET ID has changed from [PATIENT ID]_[THYMATRON SERIAL NUMBER] to [THYMATRON SERIAL NUMBER]_[PATIENT ID]_[CURRENT ECT SERIES NUMBER]. Appending the [CURRENT ECT SERIES NUMBER] is omitted, if it is empty or 1. 



---------------------------------------------------------------------------
# patient-template.txt
- NEW: GENDER: M|F|D
- NEW: INITIAL STIMULATION HEURISTICS: Age | Titration | Other
- NEW: PATIENT ECT SERIES NUMBER: 1|...|15 -> needs to be set initially 
       and incremented before the first index ECT of each new series!



---------------------------------------------------------------------------
# treatment-template.txt
- NEW: GENDER: M|F|D
- NEW: Initial Stimulation Heuristics: Age | Titration | Other
- NEW: CURRENT ECT SERIES NUMBER: -> copied from PATIENT INFORMATION
- FIX: Product names in drop downs are replaced by the respective substance names,
       i.e. Primperan -> Metoclopramid, Erapidil -> Urapidil, Toradol -> Ketorolac.
- ADD: Lorazepam postical to concurrent medication and medication changes.



---------------------------------------------------------------------------
# GENET_DB_Export.v092-2-tables.ftl
## GENET_DB_Export_Patients

GPD field name                       exported variable name
-----------------------------------------------------------------
GENET ID                             genet_id
THYMATRON SERIAL NUMBER              redcap_data_access_group
redcap_event_name                    redcap_event_name
PATIENT ID                           patient_id
PATIENT ECT SERIES NUMBER            ect_series_nmb_pat
DATE OF BIRTH (DD.MM.YYYY)           year_of_birth
AGE                                  age
SEX                                  sex
GENDER                               gender
YEAR OF FIRST ECT                    year_of_first_ect
WEIGHT                               weight
INITIAL STIMULATION HEURISTICS       initial_stim_heuristics

- NEW: For each patient and for each patient's instances of CURRENT ECT SERIES NUMBER an entry will be generated. Each entry is identified with a GENET ID, which is composed according to the pattern as described above. 


## GENET_DB_Export_Treatments

GPD field name                                                exported variable name
-------------------------------------------------------------------------------------------------
GENET ID                                                      genet_id
THYMATRON SERIAL NUMBER                                       redcap_data_access_group
redcap_repeat_instrument                                      redcap_repeat_instrument
redcap_event_name                                             redcap_event_name
PATIENT TREATMENT NUMBER                                      redcap_repeat_instance
CURRENT ECT SERIES NUMBER                                     ect_series_nmb_treat
PATIENT TREATMENT NUMBER                                      patient_treatment_number
DATE OF TREATMENT                                             date_of_treatment
PATIENT STATUS                                                patient_status
DIAGNOSIS (ICD-10)                                            diagnosis_icd10
DIAGNOSIS (ICD-11)                                            diagnosis_icd11
DIAGNOSIS (DSM-5)                                             diagnosis_dsm5
GENDER                                                        gender_treatment
AGE                                                           age_start_series
age                                                           age_treatment
WEIGHT                                                        weight_treatment
ECT COURSE                                                    ect_course
RESTIMULATION                                                 restimulation
ELECTRODE POSITION                                            electrode_position
ANESTHETIC                                                    anesthetic
ANESTHETIC DOSE (MG)                                          anesthetic_dose
ANESTHETIC ADD                                                anesthetic_add
ANESTHETIC ADD DOSE (MG)                                      anesthetic_add_dose
RELAXANT                                                      relaxant
RELAXANT DOSE (MG)                                            relaxant_dose
RELAXANT ADD                                                  relaxant_add
RELAXANT ADD DOSE (MG)                                        relaxant_add_dose
ANALGESICS                                                    analgesics
ANALGESICS DOSE (MG)                                          analgesics_dose
ANALGESICS ADD                                                analgesics_add
ANALGESICS ADD DOSE (MG)                                      analgesics_add_dose
ANTIEMETICS                                                   antiemetics
ANTIEMETICS DOSE (MG)                                         antiemetics_dose
ANTIEMETICS ADD                                               antiemetics_add
ANTIEMETICS ADD DOSE (MG)                                     antiemetics_add_dose
ANTIHYPERTENSIVES                                             antihypertensives
ANTIHYPERTENSIVE DOSE (MG)                                    antihypertensive_dose
ANTICHOLINERGIC                                               anticholinergic
ANTICHOLINERGIC DOSE (MG)                                     anticholinergic_dose
CONCURRENT MEDICATION_1                                       concurr_medication_1
CONCURRENT MEDICATION_1 DOSE (MG)                             concurr_medication_1_dose
CONCURRENT MEDICATION_2                                       concurr_medication_2
CONCURRENT MEDICATION_2 DOSE (MG)                             concurr_medication_2_dose
CONCURRENT MEDICATION_3                                       concurr_medication_3
CONCURRENT MEDICATION_3 DOSE (MG)                             concurr_medication_3_dose
CONCURRENT MEDICATION_4                                       concurr_medication_4
CONCURRENT MEDICATION_4 DOSE (MG)                             concurr_medication_4_dose
CONCURRENT MEDICATION_5                                       concurr_medication_5
CONCURRENT MEDICATION_5 DOSE (MG)                             concurr_medication_5_dose
CGI (1-NORMAL, 7-AMONG THE MOST EXTREMLY ILL PATIENTS)        cgi
PROGRAM SELECTED                                              program_selected
% ENERGY SET                                                  energy_set
CHARGE DELIVERED                                              charge_delivered
CURRENT                                                       current
STIMULUS DURATION                                             stimulus_duration
FREQUENCY                                                     frequency
PULSE WIDTH                                                   pulse_width
STATIC IMPEDANCE                                              static_impedance
DYNAMIC IMPEDANCE                                             dynamic_impedance
EEG ENDPOINT                                                  eeg_endpoint
EMG ENDPOINT                                                  emg_endpoint
BASE HEART RATE                                               base_heart_rate
PEAK HEART RATE                                               peak_heart_rate
AVERAGE SEIZURE ENERGY INDEX                                  avg_seizure_energy_idx
POSTICTAL SUPPRESSION INDEX                                   postictal_suppression_idx
MAXIMUM SUSTAINED POWER                                       maximum_sustained_power
TIME TO PEAK POWER                                            time_to_peak_power
MAXIMUM SUSTAINED COHERENCE                                   max_sustained_coherence
TIME TO PEAK COHERENCE                                        time_to_peak_coherence
EARLY ICTAL AMPLITUDE                                         early_ictal_amplitude
MIDICTAL AMPLITUDE                                            midictal_amplitude
POST-ICTAL AMPLITUDE                                          post_ictal_amplitude
ANESTHETICS ADMINISTERED MARKER #1                            anesthetics_adm_marker_1
RELAXANT ADMINISTERED MARKER #1                               relaxant_adm_marker_1
POST-TREATMENT START MARKER #1                                post_treat_start_marker_1
SEIZURE END MARKER #1                                         seizure_end_marker_1
EEG SEIZURE LENGTH                                            eeg_seizure_length
MOTOR SEIZURE LENGTH                                          motor_seizure_length
MEDICATION_CHANGES 1                                          medication_changes_1
MEDICATION_CHANGES 1 DOSE (MG)                                medication_changes_1_dose
MEDICATION_CHANGES 2                                          medication_changes_2
MEDICATION_CHANGES 2 DOSE (MG)                                medication_changes_2_dose
MEDICATION_CHANGES 3                                          medication_changes_3
MEDICATION_CHANGES 3 DOSE (MG)                                medication_changes_3_dose
SEIZURE EVALUATION (1-INSUFFICIENT, 2-SUFFICIENT, 3-IDEAL)    seizure_evaluation
RECOMMENDATION                                                recommendation
THYMATRON SERIAL NUMBER                                       thymatron_serial_number
EDF FILE NAME                                                 edf_file_name


-------------------------------------------------------------------------------------------------