Your doctor will most likely attempt to determine the cause of the painful medical condition and treat the underlying problem possibly with medication instead of initially prescribing pain medication. Once the medical condition is identified, it may be necessary to prescribe pain medication to compliment other treatment needed for the condition. If pain medication is necessary, the doctor would most likely prescribe a lower dosage and small amount of hydrocodone or oxycodone. If once the cause of the pain is determine and the pain is chronic, the doctor will most likely prescribe a longer term opioid such as Fentanyl.