You can use a formula field to concatenate the information from other fields to create your ID. If you need an additional identifier to make the ID unique, you can use an autonumber field or the record ID.
If you want this concatenates ID as the filename for your attachment, you can either edit the name manually or you can use a script to re-upload the file with the new name.