The CAA numbering system is based upon what was originally the medical dept computer. The numbers originally showed that you were in the CAAs medical system. They subsequently became used as licence numbers. If you have a licence issued by the UK CAA, then the medical dept has a record of your medical. It may not be overly comprehensive but it is adequate for their purposes.