Difference between revisions of "KIDS Drug File"
(→Remarks on Broken Pointers) |
(→Limitations) |
||
Line 212: | Line 212: | ||
** In Outpatient Pharmacy, Schedules do not expand into patient readable instructions | ** In Outpatient Pharmacy, Schedules do not expand into patient readable instructions | ||
* If the National Drug Files are not up to date in the destination system, there will be some broken pointers. All you have to do is update the NDF with the latest patches. | * If the National Drug Files are not up to date in the destination system, there will be some broken pointers. All you have to do is update the NDF with the latest patches. | ||
− | * If some drugs are linked with lab tests, these need to be re-linked. Preferably, these should be removed prior to transporting the drug file. | + | * If some drugs are linked with lab tests, these need to be re-linked. Preferably, these should be removed prior to transporting the drug file. You can print the Lab-related fields on the Drug File to see if there is data. The fields are: |
== Remarks on Broken Pointers == | == Remarks on Broken Pointers == |
Revision as of 19:20, 18 April 2012
Contents
Introduction (statement of the problem to solve)
Currently, there is no easy existing way to transport a drug file in VISTA into a new VISTA installation. Previous methods relied on programmers hand crafting a solution for their systems. In addition, the existing drug file in WorldVistA 1.0 was not good enough to be used in an instance and had to be deleted and replaced with a new hand entered one.
This project aims to provide the following:
- An easy way to transport a drug file
- Example drug files as KIDS distributions to use for new installations
- A spreadsheet to compare existing drug files.
Solution
A MUMPS routine was written to work with KIDS to distribute a drug file for installation on new systems. In addition, drug files were extracted and placed into an open office spreadsheet for comparison.
The following files are transported from a source instance to another:
* ^PSDRUG DRUG * ^PS(50.7) PHARMACY ORDERABLE ITEM * ^PS(51.7) DRUG TEXT * ^PS(52.6) IV ADDITIVES * ^PS(52.7) IV SOLUTIONS * ^PS(50.4) DRUG ELECTROLYTES
CPRS (OE/RR) files are then synced with the new files.
Deliverables
Located on the WorldVistA Trac Server. See warning below on usage.
- Comparison Spreadsheet
- Routine VWPSSXPD
- Example Drug File Source IC
- Example Drug File Source W
- README
How to use?
WARNING |
Using a KIDS file produced by this tool will result in your drug files (see the list above) being deleted and replaced. If your database contains pharmacy patient data, this will cause permanent corruption of your PHI.
END |
Workflow
On the Origin System:
- Create a KIDS build that calls the following:
- Routine VWPSSXPD to call from top is the Environment Check for the Build
- PRE^VWPSSXPD is the Pre-Init for the Destination System
- POST^VWPSSXPD is the Post-Init for the Destination System
- TRAN^VWPSSXPD is the Pre-Transport Routine for your originating system drug data
- Generate the KIDS Build. The file will have all the Drug Data from the Origin System.
On the Destination System:
- Install the KIDS Build
Generating the KIDS build, loading it, and installing it takes some time. In my tests, never more than 30 seconds each; typically 5 to 10 seconds.
Here is what the first screen of Edit a Build [XPD EDIT BUILD]
menu option will look like. No other screens have to be filled out.
Edit a Build PAGE 1 OF 5 Name: DRUG FILE 4 WV SOURCE W 1.0 TYPE: SINGLE PACKAGE ------------------------------------------------------------------------------- Name: DRUG FILE 4 WV SOURCE W 1.0 Date Distributed: APR 16,2012 Description: Delete Routine after install Environment Check Routine: VWPSSXPD Y/N: Pre-Install Routine: PRE^VWPSSXPD Y/N: Post-Install Routine: POST^VWPSSXPD Y/N: Pre-Transportation Routine: TRAN^VWPSSXPD _______________________________________________________________________________ COMMAND: Press <PF1>H for help Insert
The install log looks like this:
MU-beta>D ^XPDIL,^XPDI Enter a Host File: drug_file_4wv_source_ic_0100.kids KIDS Distribution saved on Apr 16, 2012@13:16:04 Comment: Example Drug File Installation This Distribution contains Transport Globals for the following Package(s): Build DRUG FILE 4 WV SOURCE IC 1.0 has been loaded before, here is when: DRUG FILE 4 WV SOURCE IC 1.0 Install Completed was loaded on Apr 13, 2012@08:58:03 OK to continue with Load? NO// YES Distribution OK! Want to Continue with Load? YES// Loading Distribution... Build DRUG FILE 4 WV SOURCE IC 1.0 has an Enviromental Check Routine Want to RUN the Environment Check Routine? YES// NO DRUG FILE 4 WV SOURCE IC 1.0 Use INSTALL NAME: DRUG FILE 4 WV SOURCE IC 1.0 to install this Distribution. Select INSTALL NAME: DRUG FILE 4 WV SOURCE IC 1.0 Loaded from Distributio n Loaded from Distribution 4/13/12@13:24 => Example Drug File Installation ;Created on Apr 16, 2012@13:16:04 This Distribution was loaded on Apr 13, 2012@13:24 with header of Example Drug File Installation ;Created on Apr 16, 2012@13:16:04 It consisted of the following Install(s): DRUG FILE 4 WV SOURCE IC 1.0 Checking DRUG FILE 4 WV SOURCE IC 1.0 for overlap with VOE 1.0 . OK No overlap found Checking DRUG FILE 4 WV SOURCE IC 1.0 for overlap with VOE 1.1 . OK No overlap found Checking DRUG FILE 4 WV SOURCE IC 1.0 for overlap with NO HOME 1.0 . OK No overlap found Checking Install for Package DRUG FILE 4 WV SOURCE IC 1.0 Will first run the Environment Check Routine, VWPSSXPD ------ WARNING WARNING WARNING ----- This package will delete your drug file and add a new drug file contained in the distribution. If you have patient pharmacy data, this will CORRUPT your database. You are running in a Test Environment. Are you sure you want to continue? Type a full YES/yes if you want to proceed) ANSWER: YES Install Questions for DRUG FILE 4 WV SOURCE IC 1.0 Want KIDS to INHIBIT LOGONs during the install? NO// Want to DISABLE Scheduled Options, Menu Options, and Protocols? NO// Enter the Device you want to print the Install messages. You can queue the install by enter a 'Q' at the device prompt. Enter a '^' to abort the install. DEVICE: HOME// ;P-OTHER;80;99999 TELNET Install Started for DRUG FILE 4 WV SOURCE IC 1.0 : Apr 13, 2012@13:24:23 Build Distribution Date: Apr 16, 2012 Installing Routines:.. Apr 13, 2012@13:24:23 Running Pre-Install Routine: PRE^VWPSSXPD. Killing Drug (50) Killing Pharmacy Orderable Item (OI) (50.7) Killing Drug Text (51.7) Killing IV Additives (52.6) Killing IV Solutions (52.7) Killing Drug Electrolytes (50.4) Removing Pharmacy OIs from the Orderable Item (101.43) Syncing the Order Quick View (101.44) --> Rebuilding IVA RX --> Rebuilding IVB RX --> Rebuilding IVM RX --> Rebuilding NV RX --> Rebuilding O RX --> Rebuilding UD RX Running Post-Install Routine: POST^VWPSSXPD. Syncing Pharamcy Orderable Item 1 Syncing Pharamcy Orderable Item 2 Syncing Pharamcy Orderable Item 3 [output elided] Syncing Pharamcy Orderable Item 417 Syncing Pharamcy Orderable Item 418 --> Rebuilding IVA RX --> Rebuilding IVB RX --> Rebuilding IVM RX --> Rebuilding NV RX --> Rebuilding O RX --> Rebuilding UD RX Updating Routine file...... Updating KIDS files..... DRUG FILE 4 WV SOURCE IC 1.0 Installed. Apr 13, 2012@13:24:41 No link to PACKAGE file NO Install Message sent
Limitations
- If the Administration Schedules from the originating system and destination system don't match, you need to either change the schedules on the orderable items, or make the schedules on the destination system the same as the ones from incoming drug file, otherwise, the problems you run into is this:
- Orders do not calculate frequency correctly if the schedule is not present in the destination system. This means that the proper number of pills cannot be calculated.
- In Outpatient Pharmacy, Schedules do not expand into patient readable instructions
- If the National Drug Files are not up to date in the destination system, there will be some broken pointers. All you have to do is update the NDF with the latest patches.
- If some drugs are linked with lab tests, these need to be re-linked. Preferably, these should be removed prior to transporting the drug file. You can print the Lab-related fields on the Drug File to see if there is data. The fields are:
Remarks on Broken Pointers
Because many files point to the Pharmacy Orderable Item and Drug files, you practically cannot use this package on a database that contains patient-specific pharmacy data since all data will be corrupted.
When installing a new drug and pharmacy orderable item file, the following may be broken:
- For Drug File:
- LAB TEST MONITOR field.
- SPECIMEN TYPE field.
- CLOZAPINE LAB TEST:LAB TEST MONITOR field
- CLOZAPINE LAB TEST:SPECIMEN TYPE field
- ATC CANISTER:WARD GROUP FOR CANISTER
- ACTIVITY LOG:INITIATOR OF ACTIVITY (field not used currently)
- NDC BY OUTPATIENT SITE:OUTPATIENT SITE
- IFCAP ITEM NUMBER:ITEM NUMBER (field not used currently)
- Custom UNIT DOSE MED ROUTE (field not used currently)
- NATIONAL DRUG FILE ENTRY (if you don't have a recently patched NDF)
- PSNDF VA PRODUCT NAME ENTRY (if you don't have a recently patched NDF).
- For Pharmacy Orderable Item File:
- MEDICATION ROUTES (additions are allowed, not deletions)
The National Drug Files are Standardized. However, a system may be out of date. If you do not have the latest National Drug Files, you have will broken pointers if the source of your drug files has a more recent National Drug File. For best results, the source system and the destination system should be patched up to the latest patch level.
To check for broken pointers, use the VERIFY FIELDs option in Fileman. Here is an example of a drug file from a patched system installed on a system that is not patched:
GTM>D P^DI VA FileMan 22.0 Select OPTION: UTILITY FUNCTIONS Select UTILITY OPTION: VERIFY FIELDS MODIFY WHAT FILE: DRUG// VERIFY WHICH FIELD: PSNDF VA PRODUCT NAME ENTRY DEVICE: HOME// VERIFY FIELDS REPORT DRUG FILE (#50) APR 16, 2012 12:40 PAGE 1 ------------------------------------------------------------------------------- POINTER (CANNOT CHECK CROSS-REFERENCE) ENTRY# GENERIC NAME ERROR 148 GUANFACINE 1MG TAB ER No '21739' in pointed-to File 149 GUANFACINE 2MG TAB ER No '21740' in pointed-to File 168 LURASIDONE 40MG TAB No '22028' in pointed-to File 169 LURASIDONE 80MG TAB No '22030' in pointed-to File 221 LEVONORGESTREL 1.5MG TAB No '21157' in pointed-to File 450 LIDOCAINE 5% PATCH No '22004' in pointed-to File 456 NEOMYCIN/POLYMYXIN/BACITRACIN OINT No '21497' in pointed-to File 485 MICONAZOLE 4% VAGINAL CREAM No '22325' in pointed-to File 585 PALIPERIDONE 234MG INJ SUSP PFSNo '21021' in pointed-to File 586 PALIPERIDONE 156MG INJ SUSP PFSNo '21022' in pointed-to File