If it is a printed prescription then the information from your patient record is used and will often include middle names. Middle names are useful in distinguishing people with the same name (and sometimes same address).
Hand written tends to be more rushed and just includes the minimum amount of information required legally.