Production line (PL) for the production of ophthalmic lenses , in particular contact lenses such as soft contact lenses, the production line comprising - a manufacturing module (MM) in which the ophthalmic lenses are manufactured, - an extraction and treatment module (EM) for the extraction and chemical treatment of the ophthalmic lenses manufactured in the manufacturing module (MM), - an inspection module (IM) in which the ophthalmic lenses manufactured are inspected, and - a packaging module (PP) in which the ophthalmic lenses which have been identified by the inspection module (IM) as being acceptable are packed into primary packages, wherein interfaces are arranged at fixed locations between the manufacturing module (MM), the extraction module (EM), the inspection module (IM) and the packaging module (PP), and wherein the manufacturing module (MM) comprises a plurality of manufacturing stations for manufacturing the ophthalmic lenses, with at least one of these manufacturing stations (310; 320, 321, 322, 330, 331) being configured to apply a lens identification code to the respective ophthalmic lens, the lens identification code including information indicative of the type of the respective ophthalmic lens manufactured, wherein either the inspection module (IM) or the packaging module (PP) includes a lens detection station configured to read the lens identification code applied to the respective ophthalmic lens and to detect the type of the ophthalmic lens from the lens identification code read from the respective ophthalmic lens in order to determine whether the type of ophthalmic lens detected actually is the type of ophthalmic lens which is expected to be detected by the lens detection station at that time. - a manufacturing module (MM) in which the ophthalmic lenses are manufactured, - an extraction and treatment module (EM) for the extraction and chemical treatment of the ophthalmic lenses manufactured in the manufacturing module (MM), - an inspection module (IM) in which the ophthalmic lenses manufactured are inspected, and - a packaging module (PP) in which the ophthalmic lenses which have been identified by the inspection module (IM) as being acceptable are packed into primary packages, wherein interfaces are arranged at fixed locations between the manufacturing module (MM), the extraction module (EM), the inspection module (IM) and the packaging module (PP), and wherein the manufacturing module (MM) comprises a plurality of manufacturing stations for manufacturing the ophthalmic lenses, with at least one of these manufacturing stations (310; 320, 321, 322, 330, 331) being configured to apply a lens identification code to the respective ophthalmic lens, the lens identification code including information indicative of the type of the respective ophthalmic lens manufactured, wherein either the inspection module (IM) or the packaging module (PP) includes a lens detection station configured to read the lens identification code applied to the respective ophthalmic lens and to detect the type of the ophthalmic lens from the lens identification code read from the respective ophthalmic lens in order to determine whether the type of ophthalmic lens detected actually is the type of ophthalmic lens which is expected to be detected by the lens detection station at that time. <EOS>