Uživatel:Kychot/emgdb event stru.sql/v.027

Z Wikiverzity
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Databáze: `emgdb`, table `event`
-- v. 0.27:
-- MB1, MB2
-- n už není AUTO INCREMENT

DROP TABLE IF EXISTS `event`;

CREATE TABLE IF NOT EXISTS `event` (	# an event of the protocol
  `inv` VARCHAR ( 3 ) NOT NULL,	# investigation code, for example A, 2A etc.
  `ltr` VARCHAR ( 1 ) NOT NULL, # sequential letter of the EMG record: A, B, C, ... etc.
  `n`   INT     ( 6 ) NOT NULL,	# sequential number of this event: 1, 2, ... etc.
#		AUTO_INCREMENT,
  `t1`  TIME          NULL,	# starting timepoint
  `dt`  TIME          NULL,	# delta t = duration of this event
  `t2`  TIME          NULL,	# ending timepoint = t1 + dt
  `MB1` FLOAT   (4,1) NULL,	# amount of MB saved in the binary file (the value readed from the EMG display)
  `MB2` FLOAT   (4,1) NULL,	# dtto – ending point
  `ch` SET ('all','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20') NULL,
				# the number of channel
  `event` ENUM (		# what type of this event:
	'record',		    # recording of EMG
	'amplifier',		    # amplifier
	'electrode',		    # some action with some/any electrode(s) (electrical aspect)
	'needle',		    # mechanical aspect of the needle electrode(s): moving, pushing etc.
	'press',		    # pressure on some point (stimulus on the remote TrP)
	'motion',		    # some motion or another activity of the patient
	'speech',		    # the patient is speaking
	'disturbance',		    # some kind of disturbance of the investigation
	'iritation',		    # some kind of iritation
	'signal',		    # signal observed: some EMG activity (waves) occur etc.
	'instruction',		    # instructions given to the patient
	'breath',		    # controlled breathing
	'quiet',		    # bedrest without any activity or disturbance
	'position',		    # the position of the body etc.
	'picture',		    # a picture (photo) taken
	'other'			    # other kind of event
  ) NULL,
  `attr` SET (			# some attribute of the event:
  	     			  # record:
#  	'duration',		    # duration of the whole record from..to (relative time)
				  # amplifier:
#	'input',		    # input of amplifier
	'filter',		    # filter
	'gain',			    # gain
  	     			  #direction:
	'in',			    # in
	'into',			    # into
	'out',			    # retraction
	'off',			    # retraction away from
				  # filter,
	'low',			    # low frequency bouundary
	'high',			    # high frequency bouundary
  	     			  # electrode:
	'monopolar',		    # monopolar needle electrode
	'coaxial',		    # coaxial needle electrode
	'surface',		    # surface electrode
#	'act',			    # active electrode (different)
#	'ref',			    # reference electrode (indifferent)
	'touch',		    # touch the electrode
  	      			  # motion:
	'turn',			    # turn (cs: otočit, pootočit)
	'raise',		    # raise, lift (cs: zvednout, pozvednout)
				  # needle:
	'insert',		    # insertion in the body
	'depth',		    # depth
	'push',			    # push into greater depth
	'skin',			    # penetration through the skin or pulling out of the skin
	'tautband',		    # penetration through the taut band or leaving the taut band
	'fascia',		    # penetration through the fascia or leaving the fascia
	'pull',			    # hitch the needle into the lower depths
	'roof',			    # phenomenon of the roof by the needle extraction
	'!roof',		    # NOT phenomenon of the roof by the needle extraction
	'manip',		    # some manipulation
	'move',			    # some moving
	'search',		    # searching of the activity
	'fix',			    # fixation
	'blood',		    # bleeding (after pulling the needle out)
				  # press: the point of the pressure
	'sole',			    # sole (cs: ploska_nohy)
	'calf',			    # the middle of the calf (cs:lýtko)
	'HMS',			    # hammstring
	'paracocc',		    # paracoccygial
	'ang_costae4',		    # angulus costae of the IV-th rib
	'ang_costae5',		    # angulus costae of the V-th rib
	'ang_costae6',		    # angulus costae of the VI-th rib
	'ang_costae',		    # angulus costae (rib unknown)
	'm_trapesius',		    # m. trapesius
				  # other patient's body parts:
	'head',			    # head (cs: hlava)
	'body',			    # body (cs: trup)
	'shoulder',		    # shoulder (cs:rameno)
	'back',			    # back (cs: záda)
	'arm',			    # arm (cs: paže)
	'leg',			    # leg (cs: noha)
	                          # breath:
#        'controlled2',		    # 2 time intervals: inspiration + expiration, equal time intervals, for example 5 + 5 sec.
#        'controlled3',		    # 3 time intervals: inspiration + holding + expiration, equal time intervals
	'inspir',		    # breath in
	'hold',		    	    # holding breath
	'expir',		    # breath out
				  # signal:
	'insertion',		    # insertion activity
	'AP',			    # action potential
	'serie',		    # serie
	'NPN',			    # neuromuscular plate noise
	'NPP',			    # neuromuscular plate potentials
	'artefact',		    # some kind of artefact
	'EKG',			    # EKG activity
	'activity',		    # some kind of activity
	'vanished',		    #
				  # disturbance:
	'ring',			    # phone ring
	'talk',			    # talking (not with the patient)
	'haunt',		    # some another person disturbing the investigation
	'noise',		    # another noise
				  # record:
	'start',		    # start of recording
	'stop',			    # stop of recording
	'unnoticed',		    # (cs: nepozorovaně)
	'localtime',		    # local time hh:mm
				  # picture:
	'screen'		    # screen of monitor
  ) NULL,
  `side` ENUM (			  # side of the action, laterality:
	'sin',			    # l. sinister = the left side
	'dx',			    # l. dexter = the rigth side
	'bilat',		    # bilateral = both sides
	'med',		    	    # medial = in the middle
	'left',			    # moving, position of head etc.
	'right'
  ) NULL,
  `value` VARCHAR (10 ) NULL ,	# some quantification of the event: the value
  `unit`  ENUM (	     	# physical unit, for example:
  	'N',      	  	    # physical force of the pressure [Newton],
	'uV',			    # the amplitude of the EMG activity [microVolt]
	'mV',			    # the amplitude of the EMG activity [milliVolt]
	'uV/DIV',		    # the gain of the amplifier [microVolt/division]
	'mV/DIV',		    # the gain of the amplifier [milliVolt/division]
	'Hz',			    # the frequence [Herz]
	'kHz',			    # the frequence [kiloHerz]
	'mm',			    # the deep of the needle [millimeter]
	's',			    # the period of controlled breathing [second] (for example: 15 s = 5+5+5)
				    # localtime
        'CET',			      # Central European Time
        'CEST'			      # Central European Summer Time: (last March Sun - last Oct Sun) 
  ) NULL,
  `comment` VARCHAR( 1000 ) NULL ,	# some free comment to the event
  	    	     	    	 # 15 columns total
  PRIMARY KEY ( `inv`, `ltr`, `n` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=1 COMMENT = 'event occured in the time of EMG recording';

SHOW WARNINGS;
SELECT * FROM event;
SHOW WARNINGS;
SHOW TABLES;
SHOW WARNINGS;