Menu

AMC reporting for multi doctor specialty

Developers
2012-07-26
2013-04-06
  • Tony McCormick

    Tony McCormick - 2012-07-26

    I think that the AMC calculation is assuming that there is a single provider assigned to each patient.  Which is fine in a primary care office but not in a specialty radiology office (or any place where a patient is routinely seen by different doctors).  The ONC rules allow the doctors to share a patient and have it be counted.  

    So… we need option called "Patients Shared for AMC" in globals, and we need to modify the AMC report to count unique patients that have encounters assigned to a Provider for the calculation if the option is checked.  

    We are working on a proposed solution, I will submit this change to the public for review when I get it.  

    Tony

     
  • Brady Miller

    Brady Miller - 2012-07-26

    Hi Tony,

    Rather than a global, more straightforward to make this an option in the report:
    1. Add option to report (ie. a select menu):
    reports/cqm.php
    2. Add a new parameter to test_rules_clinic (maybe $pat_prov_rel) in library/clinical_rules.php to bring this option into function.
    3. Use the new parameter in the test_rules_clinic function at:

      // Collect all patient ids
      $patientData = array();
      if (!empty($patient_id)) {
        // only look at the selected patient
        $patientData[0]['pid'] = $patient_id;
      }
      else {
        if (empty($provider)) {
          // Look at entire practice
          $rez = sqlStatement("SELECT `pid` FROM `patient_data`");
          for($iter=0; $row=sqlFetchArray($rez); $iter++) {
           $patientData[$iter]=$row;
          } 
        }
        else {
          // Look at one provider
          $rez = sqlStatement("SELECT `pid` FROM `patient_data` " .
            "WHERE providerID=?", array($provider) );
          for($iter=0; $row=sqlFetchArray($rez); $iter++) {
           $patientData[$iter]=$row;
          }
        }
      }
    

    Doing this is much better than a global, because then it won't muck up the other stuff that uses this engine (also gives practices easy way to play around with them and choose the one that works best). Also then can be used in CQM and standard CDR reports too (without any additional work).

    -brady
    OpenEMR

     
  • Brady Miller

    Brady Miller - 2012-08-16

    Hi Tony,
    Will review it over the weekend (looks good, but I may slightly modify it, so that it will be an option for all of the reports (standard,AMC,CQM).
    -brady

     
  • Brady Miller

    Brady Miller - 2012-08-17

    Hi Tony and Ensoftek,

    Placed a heavily modified version of this code here:
    http://github.com/bradymiller/openemr/commits/amc-prov-rel_1
    (it allows choosing 'Primary' or 'Encounter' which are described when hover over the selection in all of the reports(standard,AMC,CQM))

    It is testing well and plan to commit to both master and rel-411 branches (not having this option has been considered a bug by some, which is why placing in rel-411).

    -brady
    OpenEMR

     
  • Tony McCormick

    Tony McCormick - 2012-08-18

    Excellent - Thanks man!
    -Tony

     
  • Brady Miller

    Brady Miller - 2012-08-18

    Hi,

    Just committed this, but realized probably makes sense to check the supervisor_id column in form_encounter also for the provider id (this will be an extremely simple thing to add). Will plan to add this over the weekend, so let me know before then if there are any potential issues with doing that. Note with the current mechanism, also easy to add additional selections (for example, if want a minimum number of encounters or want providers that either are in an encounter or assigned as providers, etc.).

    -brady
    OpenEMR

     
  • Brady Miller

    Brady Miller - 2012-08-18

    Hi,
    Just committed the supervisor_id fix to sourceforge(both master and rel-411).
    -brady
    OpenEMR

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.