Check Sub PharmCheck: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
m (Text replacement - "CCMDB.mdb" to "CCMDB.accdb")
mNo edit summary
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Data Integrity Check
{{Data Integrity Check
| DIC_summary = checks that every CC pt has at least one pharmacy record (possibly all zeros), that patients don't have drug days than LOS, disallows complete check if [[Arrive DtTm]] or [[Dispo DtTm]] are missing because that would break max count check,  
| DIC_summary = checks that every CC pt has at least one pharmacy record (possibly all zeros), that patients don't have more drug days than LOS, disallows complete check if [[Arrive DtTm]] or [[Dispo DtTm]] are missing because that would break max count check,  
| DIC_related_concepts = Pharmacy collection
| DIC_related_concepts = Pharmacy collection; Arrive DtTm; Accept DtTm, LOS
| DIC_firmness = hard check
| DIC_firmness = hard check
| DIC_timing = complete
| DIC_timing = complete
Line 9: Line 9:
| DIC_implementation_date = 2012-01-01
| DIC_implementation_date = 2012-01-01
}}
}}


* each patient has to have at least one line of no entries (implemented)
* each patient has to have at least one line of no entries (implemented)


* maximum count for any drug must be < LOS+2 if calculated using admit date/time & discharge date/(time or 23:59 if unavailable)
uses function LOS() to calculate the LOS
** implemented as LOS = CLng(Nz(Form_View.R_DisDate) + nz(Form_View.R_DisTime, 1)) - Nz(Form_View.R_AdmDate, 0))
 


PharmCheck used to be used to do internal consistency checks on Pharmacy data. No longer used since change in Pharmacy data structure 2012-01-01. See [[Pharmacy_collection#Data_Integrity_Rules]] for data consistency checking in new paradigm.  
PharmCheck used to be used to do internal consistency checks on Pharmacy data. No longer used since change in Pharmacy data structure 2012-01-01. See [[Pharmacy_collection#Data_Integrity_Rules]] for data consistency checking in new paradigm.  
Line 39: Line 35:
* if three are duplicate priorities, an error is generated
* if three are duplicate priorities, an error is generated
* if one of the entries is "No Pharm" and there are other entries, an error is generated}}
* if one of the entries is "No Pharm" and there are other entries, an error is generated}}
== Related articles ==
{{Related Articles}}
[[Category:Length of stay]]

Revision as of 17:01, 2021 May 5

Data Integrity Checks
Summary: checks that every CC pt has at least one pharmacy record (possibly all zeros), that patients don't have more drug days than LOS, disallows complete check if Arrive DtTm or Dispo DtTm are missing because that would break max count check,
Related: Pharmacy collection, Arrive DtTm, Accept DtTm, LOS
Firmness: hard check
Timing: complete
App: CCMDB.accdb
Coding: Sub PharmCheck
Uses L Problem table: not relevant for this app
Status: implemented
Implementation Date: 2012-01-01
Backlogged: true
  • Cargo


  • SMW


  • Categories: 
  • form:
  • each patient has to have at least one line of no entries (implemented)

uses function LOS() to calculate the LOS

PharmCheck used to be used to do internal consistency checks on Pharmacy data. No longer used since change in Pharmacy data structure 2012-01-01. See Pharmacy_collection#Data_Integrity_Rules for data consistency checking in new paradigm.

Legacy data   

Public Sub PharmCheck provides for the consistency checks for pharmacy collection.

  • If the settings file has "CC" as program and not HSC as the hospital (pharmacy is imported for HSC) and if the patient was admitted before 2012-Jan-1 then the following checks are run:
    • if there is no entry for a patient, an error is generated (must enter "No Drugs")
    • if there are more than 16 entries, an error is generated
    • if there is an entry but any of the following are true, an error is generated
      • drug name missing
      • # doses is 0
      • # doses > maxdoses as per S Drugs
        • maxdoses in s_drugs are all 9999 as of 2011-11-18, i.e. this was not meaningfully implemented. not doing now as we are moving to a different pharmacy scheme soon Ttenbergen 11:31, 18 November 2011 (CST)
      • # days is 0
      • # days > LOS
  • if there are duplicate drugs, an error is generated
  • if three are duplicate priorities, an error is generated
  • if one of the entries is "No Pharm" and there are other entries, an error is generated

Related articles

Related articles: