Index: /pharmacy-utils/drug-file-cleanup/README.txt
===================================================================
--- /pharmacy-utils/drug-file-cleanup/README.txt	(revision 1412)
+++ /pharmacy-utils/drug-file-cleanup/README.txt	(revision 1413)
@@ -20,11 +20,13 @@
 Workflow (using KIDS):
  ; On the Origin System:
- ; - Create a KIDS build that calls the follwing:
- ;  1. This Routine Name to call from top is the Environment Check for the Build
- ;  2. TRAN is the Pre-Transport Routine for your originating system drug data
- ;  3. PRE is the Pre-Init for the Destination System
- ;  4. POST is the Post-Init for the Destination System
+ ; - Create a KIDS build that calls the following:
+ ;  1. This Routine Name to call from top is the Environment Check for the 
+ ;     Build
+ ;  2. PRE is the Pre-Init for the Destination System
+ ;  3. POST is the Post-Init for the Destination System
+ ;  4. TRAN 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
@@ -39,5 +41,5 @@
 into a destination system.
 
-                          --- KIDS TEXT ----
+                          --- END KIDS TEXT ----
 License is AGPL.
 
@@ -45,10 +47,35 @@
 
 Limitations/Ideas for Future Development:
-- Not sure if the MEDICATION ROUTES should be transmitted or not. While additions are allowed, they are by my experience uncommon.
-- Many reference files (e.g. PACKAGE SIZE or DRUG UNITS) are not part of the NDF, yet they are not user modifiable. Yet, they are referenced almost exclusively from the National Drug Files; which means that they cannot be changed without corrupting the NDF data. I am trying to find documentation to say that they are standard.
-
-Remarks on Broken Pointers in Destination Systems as a result of using this package:
-Because many files point to the Pharmacy Orderable Item and Drug files, you practically cannot use this package on a database that contains pharmacy data since all data will be corrupted.
-When installing a new drug and pharmacy orderable item file, the following may be broken:
+- Not sure if the MEDICATION ROUTES should be transmitted or not. While 
+  additions are allowed, they are by my experience uncommon.
+- Many reference files (e.g. PACKAGE SIZE or DRUG UNITS) are not part of the 
+  NDF, yet they are not user modifiable. Yet, they are referenced almost 
+  exclusively from the National Drug Files; which means that they cannot be 
+  changed without corrupting the NDF data. I am trying to find documentation 
+  to say that they are standard.
+- 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.
+
+
+Remarks on Broken Pointers in Destination Systems as a result of using this 
+package:
+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.
@@ -67,7 +94,11 @@
 - 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 have a commensurate NDF patch level.
-
-To check for broken pointer, use the VERIFY FIELDs option in Fileman.
+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 have a 
+commensurate NDF 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:
@@ -107,38 +138,6 @@
 ==============================================================================
 
-See detailed analysis below.
-
-    File/Package: PHARM ORD ITEM                                     Date: APR 12,2012
-
-  FILE (#)                                            POINTER           (#) FILE
-   POINTER FIELD                                       TYPE           POINTER FIELD              FILE POINTED TO
-------------------------------------------------------------------------------------------------------------------------------------
-          L=Laygo      S=File not in set      N=Normal Ref.      C=Xref.
-          *=Truncated      m=Multiple           v=Variable Pointer
-
-                                                                  -------------------------------
-  DRUG (#50)                                                      |                             |
-    PHARMACY ORDERABLE ITEM ........................  (N S C L)-> |  50.7 PHARMACY ORDERABLE I* |
-  PRESCRIPTION (#52)                                              |                             |
-    PHARMACY ORDERABLE ITEM ........................  (N S )->    |   DOSAGE FORM               |-> DOSAGE FORM (file locked down)
-  PENDING OUTPATIENT O (#52.41)                                   |                             |
-    PHARMACY ORDERABLE ITEM ........................  (N S )->    |   MED ROUTE                 |-> MEDICATION ROUTES (addable)
-  IV ADDITIVES (#52.6)                                            |                             |
-    PHARMACY ORDERABLE ITEM ........................  (N S C )->  | m DIVISION/SI:DIVISION/SI*  |-> OUTPATIENT SITE (not used)
-  IV SOLUTIONS (#52.7)                                            |                             |
-    PHARMACY ORDERABLE ITEM ........................  (N S C L)-> | m OI-DRUG TEX:OI-DRUG TEX*  |-> DRUG TEXT (used -- included)
-  NON-VERIFIED ORDERS (#53.1)                                     |                             |
-    ORDERABLE ITEM .................................  (N S )->    |                             |
-  UNIT DOSE ORDER SET (#53.22)                                    |                             |
-    ORDERABLE ITEM .................................  (N S )->    |                             |
-  PICK LIST (#53.52)                                              |                             |
-    PATIENT:ORDER:ORDERABLE ITEM ...................  (N S )->    |                             |
-  BCMA MEDICATION LOG (#53.79)                                    |                             |
-    ADMINISTRATION MEDICATION ......................  (N S )->    |                             |
-  PHARMACY PATIENT (#55.01)                                       |                             |
-    IV:ORDERABLE ITEM ..............................  (N S )->    |                             |
-    NON-VA MEDS:ORDERABLE ITEM .....................  (N S )->    |                             |
-    UNIT DOSE:ORDERABLE ITEM .......................  (N S )->    |                             |
-                                                                  -------------------------------
+Below you will find the pointer relations of all the files that are transmitted in this KIDS build.
+
     File/Package: DRUG                                               Date: APR 12,2012
 
@@ -277,2 +276,103 @@
                                                                   -------------------------------
 
+    File/Package: PHARM ORD ITEM                                     Date: APR 12,2012
+
+  FILE (#)                                            POINTER           (#) FILE
+   POINTER FIELD                                       TYPE           POINTER FIELD              FILE POINTED TO
+------------------------------------------------------------------------------------------------------------------------------------
+          L=Laygo      S=File not in set      N=Normal Ref.      C=Xref.
+          *=Truncated      m=Multiple           v=Variable Pointer
+
+                                                                  -------------------------------
+  DRUG (#50)                                                      |                             |
+    PHARMACY ORDERABLE ITEM ........................  (N S C L)-> |  50.7 PHARMACY ORDERABLE I* |
+  PRESCRIPTION (#52)                                              |                             |
+    PHARMACY ORDERABLE ITEM ........................  (N S )->    |   DOSAGE FORM               |-> DOSAGE FORM (file locked down)
+  PENDING OUTPATIENT O (#52.41)                                   |                             |
+    PHARMACY ORDERABLE ITEM ........................  (N S )->    |   MED ROUTE                 |-> MEDICATION ROUTES (addable)
+  IV ADDITIVES (#52.6)                                            |                             |
+    PHARMACY ORDERABLE ITEM ........................  (N S C )->  | m DIVISION/SI:DIVISION/SI*  |-> OUTPATIENT SITE (not used)
+  IV SOLUTIONS (#52.7)                                            |                             |
+    PHARMACY ORDERABLE ITEM ........................  (N S C L)-> | m OI-DRUG TEX:OI-DRUG TEX*  |-> DRUG TEXT (used -- included)
+  NON-VERIFIED ORDERS (#53.1)                                     |                             |
+    ORDERABLE ITEM .................................  (N S )->    |                             |
+  UNIT DOSE ORDER SET (#53.22)                                    |                             |
+    ORDERABLE ITEM .................................  (N S )->    |                             |
+  PICK LIST (#53.52)                                              |                             |
+    PATIENT:ORDER:ORDERABLE ITEM ...................  (N S )->    |                             |
+  BCMA MEDICATION LOG (#53.79)                                    |                             |
+    ADMINISTRATION MEDICATION ......................  (N S )->    |                             |
+  PHARMACY PATIENT (#55.01)                                       |                             |
+    IV:ORDERABLE ITEM ..............................  (N S )->    |                             |
+    NON-VA MEDS:ORDERABLE ITEM .....................  (N S )->    |                             |
+    UNIT DOSE:ORDERABLE ITEM .......................  (N S )->    |                             |
+                                                                  -------------------------------
+
+    File/Package: DRUG TEXT                                          Date: APR 16,2012
+
+  FILE (#)                                            POINTER           (#) FILE
+   POINTER FIELD                                       TYPE           POINTER FIELD              FILE POINTED TO
+------------------------------------------------------------------------------------------------------------------------------------
+          L=Laygo      S=File not in set      N=Normal Ref.      C=Xref.
+          *=Truncated      m=Multiple           v=Variable Pointer
+
+                                                                  -------------------------------
+  DRUG (#50.037)                                                  |                             |
+    DRUG TEXT ENTRY ................................  (N S C )->  |  51.7 DRUG TEXT             |
+  PHARMACY ORDERABLE I (#50.76)                                   |                             |
+    OI-DRUG TEXT ENTRY .............................  (N S )->    |                             |
+                                                                  -------------------------------
+
+    File/Package: IV FILES                                           Date: APR 16,2012
+
+  FILE (#)                                            POINTER           (#) FILE
+   POINTER FIELD                                       TYPE           POINTER FIELD              FILE POINTED TO
+------------------------------------------------------------------------------------------------------------------------------------
+          L=Laygo      S=File not in set      N=Normal Ref.      C=Xref.
+          *=Truncated      m=Multiple           v=Variable Pointer
+
+                                                                  -------------------------------
+  IV ADDITIVES (#52.62)                                           |                             |
+    ELECTROYLTES:ELECTROLYTE .......................  (N )->      |  50.4 DRUG ELECTROLYTES     |
+  IV SOLUTIONS (#52.702)                                          |                             |
+    ELECTROLYTES ...................................  (N )->      |                             |
+                                                                  -------------------------------
+                                                                  -------------------------------
+  IV CATEGORY (#50.2)                                             |                             |
+    IV DRUG v ........................................(N S L)->   |  52.6 IV ADDITIVES          |
+    IV DRUG v ........................................(N S L)->   |   GENERIC DRUG              |-> DRUG
+  NON-VERIFIED ORDERS (#53.157)                                   |                             |
+    ADDITIVE .......................................  (N S C )->  |   PHARMACY ORDERABLE ITEM   |-> PHARMACY ORDERABLE ITEM
+  BCMA MISSING DOSE RE (#53.686)                                  |                             |
+    ADDITIVES ......................................  (N S C )->  |   *PRIMARY DRUG             |-> PRIMARY DRUG
+  BCMA UNABLE TO SCAN  (#53.7711)                                 |                             |
+    ADDITIVE .......................................  (N S C )->  |   QUICK CODE:USUAL IV SO*   |-> IV SOLUTIONS
+  BCMA MEDICATION LOG (#53.796)                                   |                             |
+    ADDITIVES ......................................  (N S C )->  |   QUICK CODE:MED ROUTE      |-> MEDICATION ROUTES
+  PHARMACY PATIENT (#55.02)                                       |                             |
+    IV:ADDITIVE ....................................  (N S )->    | m ELECTROYLTES:ELECTROLYTE  |-> DRUG ELECTROLYTES
+    BCMA ID:ADDITIVE ...............................  (N S )->    |                             |
+  PHARMACY QUICK ORDER (#57.17)                                   |                             |
+    ADDITIVE .......................................  (N S )->    |                             |
+                                                                  -------------------------------
+                                                                  -------------------------------
+  IV CATEGORY (#50.2)                                             |                             |
+    IV DRUG v ........................................(N S L)->   |  52.7 IV SOLUTIONS          |
+    IV DRUG v ........................................(N S L)->   |   GENERIC DRUG              |-> DRUG
+  IV ADDITIVES (#52.61)                                           |                             |
+    QUICK CODE:USUAL IV SOLUTION ...................  (N )->      |   PHARMACY ORDERABLE ITEM   |-> PHARMACY ORDERABLE ITEM
+  NON-VERIFIED ORDERS (#53.158)                                   |                             |
+    SOLUTION .......................................  (N S C )->  |   *PRIMARY DRUG             |-> PRIMARY DRUG
+  BCMA MISSING DOSE RE (#53.687)                                  |                             |
+    SOLUTIONS ......................................  (N S C )->  | m ELECTROLYTES:ELECTROLYTES |-> DRUG ELECTROLYTES
+  BCMA UNABLE TO SCAN  (#53.7712)                                 |                             |
+    SOLUTIONS ......................................  (N S C )->  |                             |
+  BCMA MEDICATION LOG (#53.797)                                   |                             |
+    SOLUTIONS ......................................  (N S C )->  |                             |
+  PHARMACY PATIENT (#55.1058)                                     |                             |
+    BCMA ID:SOLUTION ...............................  (N S )->    |                             |
+    IV:SOLUTION ....................................  (N S )->    |                             |
+  PHARMACY QUICK ORDER (#57.18)                                   |                             |
+    SOLUTION .......................................  (N S )->    |                             |
+                                                                  -------------------------------
+
Index: /pharmacy-utils/drug-file-cleanup/VWPSSXPD.m
===================================================================
--- /pharmacy-utils/drug-file-cleanup/VWPSSXPD.m	(revision 1412)
+++ /pharmacy-utils/drug-file-cleanup/VWPSSXPD.m	(revision 1413)
@@ -1,3 +1,3 @@
-VWPSSXPD ; VW/SMH - Update the Drug File and friends... ; 4/16/12 12:15pm
+VWPSSXPD ; VW/SMH - Update the Drug File and friends... ; 4/16/12 3:24pm
  ;;1.0;WorldVista Modifications;;;Build 5
  ; (C) Sam Habiel
@@ -25,5 +25,5 @@
  ; Workflow (using KIDS):
  ; On the Origin System:
- ; - Create a KIDS build that calls the follwing:
+ ; - Create a KIDS build that calls the following:
  ;  1. This Routine Name to call from top is the Environment Check for the Build
  ;  2. TRAN is the Pre-Transport Routine for your originating system drug data
