It seems to me there's an easy way to cut down on repetitive data entry here but it needs to be user-tested.
Per the specifications, the first line of the code contains only the letter P, passport type designation, issuing country/int'l authority, and the holder's name. All of these are usually collected separately during the normal application workflow and can be easily parsed for validation.
The second line of the code is a little tricky because, at the first sight, it looks like a string of random numbers without much meaning. In reality, it's the passport number, the holder's nationality, DOB, and sex, the passport's expiration date, holder's personal number (optional in some countries), and check digits for these strings data. The key points in the second line are that a) the holder's sex is the only letter among many numbers, b) check digits are calculated with a known algorithm, and c) some countries include the personal ID number in human-readable format.
With so many pieces of code available in human-readable format, it makes sense to collect the information through "generic" questions (such as legal name, DOB, passport number, etc) and use a front-end script to populate a field with the machine data ending with the gender digit. The reason here is that gender is the only letter among many numberes, which makes it the most easily identifiable separator after the less than sign. The system then prompts the person to complete the remaining information (passport expiration date and on) manually. This way the additional data entry is going to be just 23 characters instead of 44.
You should also make sure to use a monospaced font in the field containing the machine code in order to resemble the real-life one as much as possible.
At the point when the applicant gets to it, the data should look like this (check digits aren't correct) if the passport doesn't have the ID number in human-readable format:
P<USADOE<<JOHN<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
1234567894XXX9901013M.......................
If the passport has the ID number in human-readable format, the system can fully populate the field and ask the applicant to verify the data. However, you need to know what countries do and don't include ID numbers as a separate field of their passport's main page.