'Parse a scanned ID code (QR Code)
@param code: the scanned ID code (string)
@return: a dict {"label": the PE label,
"first_name": optional first name,
"last_name": optional last name,
"date_of_birth": optional date of birth,'

@staticmethod
def parse_code(code):

    data = {'label': code}
    pattern = current.deployment_settings.get_dvr_id_code_pattern()
    if (pattern and code):
        import re
        pattern = re.compile(pattern)
        m = pattern.match(code)
        if m:
            data.update(m.groupdict())
    return data
