Query send check centralized is owner

From CCMDB Wiki
Data Integrity Checks
Summary: Run automatically at the beginning of sending to ensure that no records that are already vetted or sent can be re-sent
Related: D_ID, Pat_ID, Service/Location field
Firmness: hard check
Timing:
App: CCMDB.accdb
Coding: Query send_check_centralized_is_owner
Uses L Problem table: not relevant for this app
Status: implemented
Implementation Date: 2016-01-01
Backlogged: true
  • Cargo


  • SMW


  • Categories: 
  • form:

Error:

At least one of the patients you are sending already exists in the Centralized_data as a complete patient. 

You most likely have a record with a wrong location or Patient ID. Or, you might be re-sending a patient you previously sent as complete. 
Click OK to see a list.

This query will usually trigger if

  • an earlier combination of Pat_ID and Service/Location is accidentally re-used on a collector laptop (e.g. should enter HSC_A1-1000 but entered HSC_A1-100)
  • something went wrong during a previous send and records were not set to "sent" or "completed" properly
  • a "sent" record was set back to "complete" or "incomplete" on a collector laptop before sending
    • this can happen if a cross-check (possibly a recently changed one) triggers on a sent record that is re-opened; in that case, delete the sent record that is causing the error

Correct by addressing the issue.

Implementation

Component query L_Log_ownerCheck_maker makes temporary table L_Log_ownerCheck which is then compared with local L Log table.

Log

  • 2020-04-26 - changed component query L_Log_ownerCheck_maker to only look at D_IDs that start with this laptop's Laptop identifier
  • 2019-10-27 - changed to not include recordstatus "deleted"
  • 2019-03-13 - tweaked query to only use relevant fields of O_L_Log, since it turns out that Access has a maximum record set size of 1GB; hopefully this will fix System resource exceeded
  • 2019-03 Around this time the STB_MedB laptop had >200 records on it and was getting System resource exceeded errors. The errors were happening when this query was run.

Related articles

Related articles: