How to Accomodate More Than One DEA Number

mike-h30 wrote on Friday, November 14, 2008:

Our physician recently received his "X" DEA number to treat patients with addiction.  How can multiple DEA numbers be setup for one physician in OpenEMR?  Will the physician have to be entered twice in OpenEMR - one for the "X" DEA number and one for the regular DEA number?

-Mike

markleeds wrote on Saturday, November 15, 2008:

You mean for treating opioid dependence? Does the X number have to be on the prescription since it is identical to the regular DEA number except that it is prefixed with an ‘X’?

You could put it in the text of the prescription.  Otherwise, it would make more sense to add an option for generating the X number from the existing DEA.

mike-h30 wrote on Saturday, November 15, 2008:

Yes, for treating opioid dependence.   Our physician is a pain management doctor.   The pharmacists want to see the regular DEA number for pain patients and the "X" DEA number for those patients being treated for opiod dependence on the prescriptions.

markleeds wrote on Saturday, November 15, 2008:

I believe that /openemr/controllers/C_Prescription.class.php can be altered so that if the prescription is for subutex of suboxone, the DEA number will be prefixed with an ‘X’.  The only problem with this is if your doctor also uses these drugs off-label for pain management.  If he only uses them as indicated, for opioid dependence, this should be adequate.

If this will work for you, I’ll do it and tell you what to change.

markleeds wrote on Saturday, November 15, 2008:

Here’s how you might do it so the prescription class intelligently determines if it needs to display the X number.

Look in C_Prescription.class.php for these lines:

203     if ($this->is_faxing || $GLOBALS[‘oer_config’][‘prescriptions’][‘show_DEA’])
204       $pdf->ezText(’<b>DEA:</b>’ . $p->provider->federal_drug_id, 12);
205     else
206       $pdf->ezText(’<b>DEA:</b> ________________________’, 12);

and change to this:

if ($this->is_faxing || $GLOBALS[‘oer_config’][‘prescriptions’][‘show_DEA’]) {
      $dea = $p->provider->federal_drug_id;
      if ( (preg_match(’/suboxone/i’,$p->get_drug())>0) ||
        (preg_match(’/subutex/i’,$p->get_drug())>0) ) {
        $dea = ‘x’.$dea; 
      }
      $pdf->ezText(’<b>DEA:</b>’ . $dea, 12);
    }
    else   
      $pdf->ezText(’<b>DEA:</b> ________________________’, 12);

mike-h30 wrote on Saturday, November 15, 2008:

"The only problem with this is if your doctor also uses these drugs off-label for pain management."

Yes, our physician does treat pain with suboxone and subutex as well.   If there is a way to add some type of a flag to indicate a pain patient or opiod dependent patient and pass it to the if/else statement then this would work.  Perhaps setting the flag in demographics with one of the custom fields and passing that variable to your code - what do you think?

markleeds wrote on Saturday, November 15, 2008:

You could do it that way.

Another way to do it, keeping changes minimal and close together, would be to use the fact that the appropriate way to prescribe suboxone/subutex off-label for pain is to write in the body of the prescription, "for pain", so the pharmacist knows not to expect the X DEA number. 

Here is another example of the above code snippet that checks to make sure that the word ‘pain’ is not in the notes section of the prescription:

if ( ( ( preg_match(’/suboxone/i’,$p->get_drug())>0 ) ||
        ( preg_match(’/subutex/i’,$p->get_drug())>0 ) ) &&
        ( preg_match(’/pain/i’,$p->get_note()) == 0 ) ) {
        $dea = ‘x’.$dea;
      }
      $pdf->ezText(’<b>DEA:</b>’ . $dea, 12);
    }
    else
      $pdf->ezText(’<b>DEA:</b> ________________________’, 12);