Medical waveform format encoding rules