%% (Internal) Wave definitions for ECG delineators used in the toolbox
%   
%   Fields used in the payload variables generated by ECGtask_ECG_delineation
% 
% 
% See also ECGtask_ECG_delineation
% 
% Author: Mariano Llamedo Soria llamedom@electron.frba.utn.edu.ar
% Version: 0.1 beta
% Last update: 09/05/2016
% Birthdate  : 09/05/2016
% Copyright 2008-2016
% 

% ecg-kit struct field format definition
cAnnotationOutputFields = { 'Pon' 'P' 'Poff' 'Ptipo' 'QRSon' 'qrs' 'Q' 'R' 'S' 'QRSoff' 'Ton' 'T' 'Tprima' 'Toff' 'Ttipo' };
cAnnotationSLRfields =    { 'Pon' 'P' 'Poff'         'QRSon' 'qrs'             'QRSoff' 'Ton' 'T' 'Tprima' 'Toff' };

% conversion from HL7-aECG to ecg-kit format
cHL7aECG_translation = ...    
    { 'MDC_ECG_WAVC_PWAVE',   'P', 'Pon', 'Poff'; ...
      'MDC_ECG_WAVC_QWAVE',   'Q', '', ''; ...
      'MDC_ECG_WAVC_RWAVE',   'R', '', ''; ...
      'MDC_ECG_WAVC_SWAVE',   'S', '', ''; ...
      'MDC_ECG_WAVC_QRSWAVE', 'qrs', 'QRSon', 'QRSoff'; ...
      'MDC_ECG_WAVC_QSWAVE',  'qrs', 'QRSon', 'QRSoff'; ...
      'MDC_ECG_WAVC_TWAVE',   'T', 'Ton', 'Toff' };

% conversion from ecg-kit format to Physionet's ecgcodes.h (wfdb_ECGCODES_H)
cMIT_wave_translation = { ...    
                    'Pon'    39; ...
                    'P'      24; ...
                    'Poff'   40; ...
                    'Ptipo'  nan; ...
                    'QRSon'  39; ...
                    'qrs'    1; ...
                    'Q'      nan; ...
                    'R'      nan; ...
                    'S'      nan; ...
                    'QRSoff' 40; ...
                    'Ton'    39; ...
                    'T'      27; ...
                    'Tprima' 27; ...
                    'Toff'   40; ...
                    'Ttipo'  nan; ...
                    };

  
  
  
  