Staff Productivity

Recently we have allowed one of our part time staff to telecommute from home. She has a VPN connection to our Terminal Server here at the main office. Any ideas of how I can track her time–or at least verify her hours? While her work is on the “honor” system, I’d still like the ability to monitor the quantity of work. Any ideas?

While I believe I can see the time she logs on and off of SOS, her log on time doesn’t mean she is actually working during that time. How about looking at amount of work on her daysheet?

Actually, there is a good bit of literature that indicates higher productivity in home workers, and this will allow your staff to show that they can be at least as productive at home as at the office. The following query would do the trick if you just want to use number of transactions entered as a metric. I would suggest that you use it over a substantial “in-office” period to establish a baseline, then once she settles in at home, do it again with the “at-home” date range. This query would give you all users who enter transactions, but you can certainly add a condition to limit to certain adduser values if you like.

SELECT
   COALESCE(STRING(adddate), 'ALL DATES') AS "DATE",
   COALESCE(adduser, 'ALL USERS') AS "USER",
   COUNT(*) AS "ENTRIES"
FROM
   sos.journal
WHERE
   adddate BETWEEN '2008-01-01' AND '2008-01-31'
GROUP BY
   ROLLUP(adddate, adduser)
ORDER BY
   "DATE", "USER"

Session Distribution By Provider

I would like to look at each provider in terms of number of clients who were only seen 1x, 1-3x, 4-6x, and more than 6x. I am looking at trends with
regards to which providers may tend to not keep patients.

This query is a bit more complex. It involves double-level grouping with a subquery and a virtual view, along with IF expressions. The inner query
groups by patient; the outer query collapses the results of the inner query by provider. Adjust the date range in the inner SELECT statement, and note that I have defined “session” as a charge entry with a fee (amount) greater than zero:

SELECT
  provcode,
  SUM("1x") AS "SingleSession",
  SUM("2-3x") AS "Two-Three",
  SUM("4-6x") AS "Four-Six",
  SUM("7+") AS "SevenPlus"
FROM
  (SELECT
    provcode,id,
    count(DISTINCT jnum) AS SrvDateCount,
    ((IF SrvDateCount = 1 THEN 1 ELSE 0 ENDIF)) AS "1x",
    (IF SrvDateCount BETWEEN 2 AND 3 THEN 1 ELSE 0 ENDIF) AS "2-3x",
    (IF SrvDateCount BETWEEN 4 AND 6 THEN 1 ELSE 0 ENDIF) AS "4-6x",
    (IF SrvDateCount > 6 THEN 1 ELSE 0 ENDIF) AS "7+"
  FROM
    sos.rv_charges
  WHERE
    trandate BETWEEN '2001-01-01' AND '2008-03-31'
    AND amount > 0
  GROUP BY
    (provcode,id))
  AS X
GROUP BY
  provcode
ORDER BY
  provcode

Services For Specified Payors For Period

I need a query that would yield all services provided for August and
September grouped by the effected insurance carriers. It would be
helpful if the services listed within each carrier group were in
ascending order by service code.

SELECT DISTINCT
  c.payorname, a.srvcode, a.lastname, a.firstname, a.id,
  a.trandate,d.insdid,d.insgroup,
  a.provcode, a.amount
FROM
  sos.rv_charges a
  JOIN sos.ptpayors b ON a.ptpayornum = b.ptpayornum
  JOIN sos.ptpolicies d ON b.ptpayornum = d.ptpayornum
  JOIN sos.payors c ON b.payornum = c.payornum
WHERE
  trandate BETWEEN '2008-08-01' AND '2008-09-30'
  /* replace with appropriate payor numbers in line below */
  AND c.payornum IN (122,25626,9750,178,8807,120,8439,25627,25584,25585)
ORDER BY
  c.payorname, a.srvcode, a.lastname, a.firstname, a.id, a.trandate

Patients With Specified Diagnosis, Intake Date, And Last Date of Service

I want to see a list of clients bearing a certain diagnosis, along with their intake date, each of their four diagnoses, and last date of service.

SELECT
  Providers. ProvCode, Providers.ProvLName, Providers.ProvFName,
  Patients.LastName, Patients.FirstName, Patients.IntakeDate,
  PtVars.LFeeDate AS "Last Service",
  PtCSUDx.DxCode1, PtCSUDx.DxCode2, PTCSUDx.DxCode3, PtCSUDx.DxCode4  
FROM
  sos.Patients
  LEFT OUTER JOIN sos.Providers ON Patients.ProviderNum = Providers.ProviderNum
  LEFT OUTER JOIN sos.PtCSU ON Patients.PtNum = PtCSU.PtNum
  LEFT OUTER JOIN sos.PtCSUDx ON PtCSU.PtCSUNum = PtCSUDx.PtCSUNum  
  LEFT OUTER JOIN sos.PtVars ON Patients.PtNum = PtVars.PtNum  
WHERE
  Patients.LicNum = 101 AND
  PtCSU.TypeFlag = 'D' AND
  PtCSUDx.DxCode1 = '300.14'   /*<-- desired Dx code goes here*/
ORDER BY
  Providers.ProvCode, Patients.LastName

Patients with Diagnosis in Any Position, By Provider

We have been asked to give statistics regarding how many dual diagnosis clients we treat during a specific time period. I can run a report requesting the primary diagnosis; however, at times I need to run a report on one specific diagnosis that may be listed as #2, 3 or even 4.

SELECT
  Providers. ProvCode, Providers.ProvLName, Providers.ProvFName,
  Patients.LastName, Patients.FirstName, Patients.IntakeDate,
  PtVars.LFeeDate AS "Last Service",
  PtCSUDx.DxCode1, PtCSUDx.DxCode2, PTCSUDx.DxCode3, PtCSUDx.DxCode4  
FROM
  sos.Patients
  LEFT OUTER JOIN sos.Providers ON Patients.ProviderNum = Providers.ProviderNum
  LEFT OUTER JOIN sos.PtCSU ON Patients.PtNum = PtCSU.PtNum
  LEFT OUTER JOIN sos.PtCSUDx ON PtCSU.PtCSUNum = PtCSUDx.PtCSUNum  
  LEFT OUTER JOIN sos.PtVars ON Patients.PtNum = PtVars.PtNum  
WHERE
  Patients.LicNum = 101
  AND PtCSU.TypeFlag = 'D'  
  AND (SELECT COUNT(*)
            FROM sos.journal
            /* service date range goes on next line */
            WHERE trantype = 'S' AND amount > 0 AND trandate BETWEEN '2000-01-01' AND '2008-06-30') > 0
  /*<-- desired Dx code goes on next line*/
  AND 'F10.150' IN (PtCSUDx.DxCode1, PtCSUDx.DxCode2, PTCSUDx.DxCode3, PtCSUDx.DxCode4)    
ORDER BY
  Providers.ProvCode, Patients.LastName, Patients.FirstName