How To Export Billing Codes or User Account Data

In some instances, there may be a need to export a list of billing codes or user information from the Argos database to a CSV file for external review. This can be accomplished with the activity export feature by customizing the export query to parse the related database tables.

  1. In Argos Manager, Reports & Data section, click on the Allocated tab and select Scheduled Export to File...                                                                                                                                               Untitled.png                                                                                   
  2. In the Activity Export window, click Create                                                                                                                                                                                              
  3. In the Scheduled Activity Export window, enter a name for the task (e.g. "Billing code export" or "User account export"). Click the ellipse (...) button next to the Export folder: field and browse to the location where the exported file will be saved. Select the type of delimited file from the Export format: drop down list.                                                                                                                                                                          
  4. Select the Export mode: radio button next to Custom. Click the Edit SQL... button to make changes to the export query.                                                                                                                                                         
  5. In the Custom SQL Query window, highlight and delete the default query text.                                                                                                 
  6. To export a single tier of billing code names and numbers, enter the query text:

    • SELECT Name, Number FROM argBillingCodes

    Click OK.                                                                                       
  7. To export two tiers of billing code names and numbers, enter the query text:

    • SELECT a.Number AS Tier1_Number, a.Name AS Tier1_Name,
      b.Number AS Tier2_Number, b.Name AS Tier2_Name
      FROM
      (SELECT Number, Name, ID FROM argBillingCodes
      WHERE Tier = '1') a
      INNER JOIN
      (SELECT Number, Name, ParentID FROM argBillingCodes
      WHERE Tier = '2') b
      ON a.ID = b.ParentID

    Click OK.                                                                              
  8. To export three tiers of billing code names and numbers, enter the query text:

    • SELECT a.Number AS Tier1_Number, a.Name AS Tier1_Name,
      b.Number AS Tier2_Number, b.Name AS Tier2_Name,
      c.Number AS Tier3_Number, c.Name AS Tier3_Name
      FROM
      (SELECT Number, Name, ID FROM argBillingCodes
      WHERE Tier = '1') a
      INNER JOIN
      (SELECT Number, Name, ParentID FROM argBillingCodes
      WHERE Tier = '2') b
      ON a.ID = b.ParentID
      INNER JOIN
      (SELECT Number, Name, ParentID FROM argBillingCodes
      WHERE Tier = '3') c
      ON a.ID = c.ParentID

    Click OK.                                                                             
  9.  To export user account information WITH PIN CODES defined, enter the query text:

    • SELECT
      a.UserName
      ,a.DomainName
      ,b.FirstName
      ,b.LastName
      ,b.Email
      ,d.GroupName
      ,e.PIN
      FROM argUserAccounts a
      INNER JOIN argUserContactInfo b
      on a.UserId = b.UserId
      INNER JOIN argUsers c
      on a.UserId = c.ID
      INNER JOIN argUserGroups d
      on c.GroupID = d.ID
      INNER JOIN argUserPins e
      on a.UserID = e.UserID
      order by a.username

    Click OK.                                                                                                                                                                                             
  10. To export user account information WITHOUT PIN CODES defined, enter the query text:

    • SELECT
      a.UserName
      ,a.DomainName
      ,b.FirstName
      ,b.LastName
      ,b.Email
      ,d.GroupName
      FROM argUserAccounts a
      INNER JOIN argUserContactInfo b
      on a.UserId = b.UserId
      INNER JOIN argUsers c
      on a.UserId = c.ID
      INNER JOIN argUserGroups d
      on c.GroupID = d.ID
      order by a.username

    Click OK.                                                                                                                                                                                                
  11. In the Schedule Activity Export window, select I will write my own from the Date filtering: drop down list. In the Advanced options: section, check the boxes next to any required file formatting options. Enter any adjustments to the file name into the File prefix: or File suffix: fields as needed.                                                       
  12. Click OK to save the settings.                                                                                                                                                                                                                                 
  13.  In the Activity Export window, click the Run button to execute the export.               
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.