Centralized import from Ed.mdb: Difference between revisions

From CCMDB Wiki
Jump to navigation Jump to search
Line 33: Line 33:


=== Importing Pharmacy.mdb ===
=== Importing Pharmacy.mdb ===
uses queries
*pharmacymdb_to_L_Pharm_flowsheet
*pharmacymdb_to_L_Log


== Change Requests ==
== Change Requests ==

Revision as of 14:45, 2014 March 3

The Access file Creating Centralized import from Ed.mdb contains the code needed to import Ed's old data into centralized_data.mdb.

It is stored on x:\ccmdb\Centralized import from Ed

Use

NOTE:For now, you need two folder on your desktop. a. Centralized front end for practice and 2. Centralized import from Eds.

  • get newest version from x:\ (\\Hsc1msfp0001\med_ccmed\CCMDB\Centralized import from Ed\copy contents of this folder to one folder on your desktop)
  • From output folder on Regional server: copy pharmacy.mdb, tasks_1.mdb and tmpv2_1.mdb into mdbs_to_import
  • copy From X:\Data Cleaning: cc_rawdata and med_rawdata contents\
    • CC_raw_data: Reg, apache, lab, pharm
    • Med_raw_data: Reg, apache, lab, ADL
  • open centralized import from ed.mdb
  • open Modules, go to module "Import", run Public Sub Import().
  • EXIT out when done (large X to right screen)
  • Final Step:FROM the Ed import folder on your own desktop, copy centralized.mdb, PHI.mdb TO the centralized Front end practice folder on your desktop.
  • you can also copy from X:\TISS28\Database\TISS28_data.mdb to the centralized Front end practice folder on your own desktop
  • when you open front end, there is a link table button, press it to link in TISS28.mdb.
  • As of Friday Feb 14, S_ALLDiagnosis table is not linked, so after you do the above, and you open centralized front end on your desktop you will need to use link manager to relink the S_ALLDIAGNOSIS table.

resolutions for differences between (ed's and legacy) and centralized

Legacy Labs values from TMSX

We are going to import the ones that we have slots for, and leave the rest in the final output from Ed in case anyone ever wants to access them in the future.

serials for early CC data

Early CC records don't have serial numbers. I assigned negative numbers arbitrarily to these to be able to generate D_IDs.

duplicates

turned out there were a few duplicates in ed's where a serial was used twice for the same hospital/location. These were resolved in Ed's data and should not be a problem for the final import.

Apache, LOS, etc

Importing these into a table "L_Aux".

Importing Pharmacy.mdb

uses queries

  • pharmacymdb_to_L_Pharm_flowsheet
  • pharmacymdb_to_L_Log

Change Requests

TMP

  • Overstay 2 lines or more per patient for this patient being displayed in patient list. Also for a number of others
    • this is probably when there are multiple records in L_tmpv2 and I have not reconciled picking only the last one... Ttenbergen 13:49, 2014 February 13 (CST)
      • email ("reconciling Tmp to only last record") to Julie to confirm that using last only is acceptable Ttenbergen 10:50, 2014 February 26 (CST)

tasks

  • ensure only applied to Log files with Study#>25650; without this there would be duplicate matches for Vic EMIP patients. (see email exchange with Julie 2014-02-03)
  • Tasks vs iTISS (Julie emailed Tina :
    • X:\Data_cleaning\Med_rawdata\TASKS.xls
    • Will this format of TASKS OK to you? In SAS, I need to have separated the acute and chronic for the med report. There are 2 worksheets because the records are already big.
    • If you need a diff format, then I will have to do some programming.

Change Log

ver 2014-02-13

copied up to x:\ Ttenbergen 18:24, 2014 February 13 (CST)

  • confirmed that Comos are getting imported. Ttenbergen 13:32, 2014 February 13 (CST)
  • confirmed that ER wait date and time get imported, need to see why not visible Ttenbergen 13:47, 2014 February 13 (CST)
  • added query pharmacymdb_to_L_Log to fill in drug checkboxes in L_Log Ttenbergen 14:06, 2014 February 13 (CST)
  • fixed orig_med_to_L_Log and orig_cc_to_L_Log to:
    • import R_DischargedTo properly. Ttenbergen 13:37, 2014 February 13 (CST)
    • import sex as full words rather than initial letters to make same as ccmdb.mdb Ttenbergen 16:14, 2014 February 13 (CST)
    • fix import for R_Type and R_DC_Treat

ver 2014-02-09

  • updated query TmpV2_to_L_TmpV2 to import dates properly Ttenbergen 21:16, 2014 February 9 (CST)
  • updated and completed code to import automatically Ttenbergen 21:16, 2014 February 9 (CST)

ver 2014-01-19

  • replaced orig_med_to_L_Log with mod version of orig_cc_to_L_Log Ttenbergen 19:20, 2014 January 19 (CST)
  • changed orig_cc_to_L_Log to exclude ADLs Ttenbergen 19:21, 2014 January 19 (CST)
  • fixed serial 99999 deletion for Med, had previously only fixed for CC Ttenbergen 21:46, 2014 January 19 (CST)
  • s_AdmitDischarge, imported locations that are in orig_* records but no longer active. Ttenbergen 21:46, 2014 January 19 (CST)
    • added field "active" , imported locations that are in orig_* records but no longer active. Ttenbergen 21:46, 2014 January 19 (CST)
    • created column "old_code" to accomodate 3-letter code "oth", which imports as "ot" due to field length restrictions. Ttenbergen 21:46, 2014 January 19 (CST)
  • added queries 1_check_no_tasks and 1_check_tasks_orphans and 1_check_task_dupes for pre-task import checks Ttenbergen 00:42, 2014 January 31 (CST)
  • added queries tasks_to_dx, tasks_to_dx_u, tasks_resolver and TASKS_d_id to process and import tasks Ttenbergen 00:42, 2014 January 31 (CST)

ver 2014-01-09

  • AP_Chronic to ap_chronic: IIf([orig_cc_apa].[CH]="N","9No CH","0HasChronic") Ttenbergen 10:36, 2014 January 10 (CST)
    • orig_med_to_L_Log
    • orig_cc_to_L_Log
  • AP_AdmitType: IIf([surgical]=False,"Medical",IIf([ES]="N","Elect.Surg","Surg.Emerg")) Ttenbergen 10:36, 2014 January 10 (CST)
    • orig_med_to_L_Log
    • orig_cc_to_L_Log
  • added Pat_ID to orig_med_to_L_Log Ttenbergen 17:21, 2014 January 14 (CST)

ver 2013-12-23

  • automated running of query "x_Infection_pathogen_fix" upon import. Ttenbergen 14:20, 2013 December 23 (CST)
  • Added MedTMS exported ADL import, table was not being processed before Ttenbergen 17:13, 2013 December 23 (CST)
  • ADLs (ADL General Collection Information)
    • imported table s_ADLOptions to resolve entries needed for l_log.adl_* fields Ttenbergen (2013 December 23)
    • updated query orig_cc_to_L_Log to include ADLs Ttenbergen (2013 December 23)
  • link to s_GCS in centralized.mdb Ttenbergen 12:44, 2013 December 30 (CST)
  • updated query orig_cc_to_L_Log to use s_GCS to populate with values used in CCMDB rather than scores from TMSX Ttenbergen 12:44, 2013 December 30 (CST)
  • changed study 99999 fix to only delete if ((orig_cc_reg.STUDY)=99999 and (orig_cc_reg.CHART)=999999999);" Ttenbergen 12:49, 2013 December 30 (CST)
  • confirmed that L_Labs_Flowsheet has values, ready for validation Ttenbergen 12:55, 2013 December 30 (CST)
  • linked in L_Pharm_Flowsheet Ttenbergen 12:56, 2013 December 30 (CST)
  • added code to import pharmacy from pharmacy.mdb Ttenbergen 14:47, 2013 December 30 (CST)

ver 2013-11-18

This is not the date it was made, but the date documenting started. after I lost and had to find the file. :-)

  • fixed lab importing
  • moved L_aux into centralized db and including in import and linking.
  • set the record_Status to complete for all imported
  • added query "x_Infection_pathogen_fix" to put dx code and pathogen number into their respective places.
  • fixed PHI import query for medicine, it was excluding names and DOB for some reason.