Difference between revisions of "Pharmacy Issues"

From VistApedia
Jump to: navigation, search
(Files and Relationships)
Line 15: Line 15:
 
*<b>ORDERABLE ITEM</b> file (file #101.43) hols things that can be ordered, including labs and drugs. This links to above.
 
*<b>ORDERABLE ITEM</b> file (file #101.43) hols things that can be ordered, including labs and drugs. This links to above.
 
*<b>ORDER QUICK VIEW</b> file (file #101.44) holds "quick order" entries. This links to above.
 
*<b>ORDER QUICK VIEW</b> file (file #101.44) holds "quick order" entries. This links to above.
 +
 +
 +
Learned so far
 +
1. For meds to show up in the dialog box in CPRS, it must have a entry like this:
 +
file: 101.44 (ORDER QUICK VIEW); 
 +
  record: ORWDSET O RX; 
 +
    subfile: SET MEMBER (101.442)
 +
      record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)  ... a drug would go here
 +
      record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)  ... a drug would go here
 +
      record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)  ... a drug would go here
 +
      record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)  ... a drug would go here
 +
 +
2. In file 101.43 (ORDERABLE ITEM) an entry for the drug must exist like this:
 +
file 101.43
 +
  record: .01 NAME = LISINOPRIL
 +
            2 ID = "Unique identifier, created from primary key passed in the
 +
                  Orderable Items update message from each package; it will be
 +
                  in the form of 'package code;99XXX' where XXX indicates the
 +
                  package table originating this item (i.e. RAP,LRT,etc.)
  
 
----
 
----

Revision as of 00:52, 24 April 2005

This page will contain notes to work out pharmacy programming issues.

Initiated by K. Toppenberg 4/2005

Keys Needed for Pharm. Setup

David Whitten searched pharmacy routines and found keys that were needed for some of the pharmacy setup routines. Here are the keys that were found: PSA ORDERS, PSAMGR, PSJ RPWARN, PSB MANAGER, PSB CPRS MED BUTTON, PSB INSTRUCTOR, PROVIDER, PSD TECH, PSDMGR, PSD BUMGR, PSD ERROR, PSD PARAM, PSD TRAN


Files and Relationships

  • VA PRODUCT file (file #50.68) holds ALL possible drugs. Some people refer to this as the National Drug File.
  • DRUG file (file #50) holds all the drugs in the local formulary. This links to above.
  • PHARMACY ORDERABLE ITEM file (file #50.7) holds things that can be ordered from the pharmacy. This links to above.
  • ORDERABLE ITEM file (file #101.43) hols things that can be ordered, including labs and drugs. This links to above.
  • ORDER QUICK VIEW file (file #101.44) holds "quick order" entries. This links to above.


Learned so far 1. For meds to show up in the dialog box in CPRS, it must have a entry like this:

file: 101.44 (ORDER QUICK VIEW);  
 record: ORWDSET O RX;  
   subfile: SET MEMBER (101.442)
     record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)   ... a drug would go here
     record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)   ... a drug would go here
     record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)   ... a drug would go here
     record: SET MEMBER: _IEN_ pointer to 101.43 (ORDERABLE ITEM)   ... a drug would go here

2. In file 101.43 (ORDERABLE ITEM) an entry for the drug must exist like this:

file 101.43
 record: .01 NAME = LISINOPRIL
           2 ID = "Unique identifier, created from primary key passed in the 
                  Orderable Items update message from each package; it will be 
                  in the form of 'package code;99XXX' where XXX indicates the 
                  package table originating this item (i.e. RAP,LRT,etc.)

Relevent Menu Options

Here is a pharmacy option/menu setup I gathered:

  cv     Protocol Conversion Utilities ... [ORCM CONVERSION UTILITIES]
  Mgr    Pharmacy Data Management ... [PSS MGR]
  NDF    National Drug File Menu ... [PSNMGR]
  Out    Outpatient Pharmacy Manager ... [PSO MANAGER]
         Drug Accountability Menu ... [PSA DRUG ACCOUNTABILITY MENU]
         Drug Receipt History Review [PSA DRUG HISTORY]
         Drug Transaction History [PSA DRUG DISPLAY]
         Enter/Edit a Drug [PSA DRUG ENTER/EDIT]
         Inquire/Compare DRUG file/ITEM MASTER file [PSA DRUG INQUIRE]

Debug of Ordering a Drug from CPRS

This is a sequence during a trial of adding a drug for a patient

 ORWU NPHASKEY  ; returns true if person has security key.

 Params ------------------------------------------------------------------
 literal	73
 literal	PROVIDER

 Results -----------------------------------------------------------------
 1


 ORWDX LOCK  ; attempt to lock pt for ordering

 Params ------------------------------------------------------------------
 literal	70685

 Results -----------------------------------------------------------------
 1


 ORWPS1 NEWDLG ; return order dialog info for New Medication

 Params ------------------------------------------------------------------
 literal	0

 Results -----------------------------------------------------------------
 147;140;4;D^Meds, Outpatient


 ORIMO IMOLOC (ORY,ORLOC,ORDFN)    ;ORY>=0: LOC is an IMO authorized location
   -- and OUT parameter for results.
   -- ORDFN: PATIENT IEN
   -- ORLOC: CLINIC LOCATION

 Params ------------------------------------------------------------------
 literal	6
 literal	70685

 Results -----------------------------------------------------------------
 -1
 Notes: IMOLOC^ORIMO checks if path PSJ*5.0*111 is installed
         In this case, this patch is NOT installed, so fails.
 
 OREVNTX1 ODPTEVID   ;Return PtEvtID based on the ORID

 Params ------------------------------------------------------------------
 literal	47

 Results -----------------------------------------------------------------


 REVNTX1 GTEVT  ;??? function doesn't exist on server.

 Params ------------------------------------------------------------------
 literal	

 Results -----------------------------------------------------------------


 ORWDPS2 QOGRP  (QOIFN)  ;"1->quick order belongs to Inpatient Med Order Group, else 0

 Params ------------------------------------------------------------------
 literal	147

 Results -----------------------------------------------------------------
 0


 ORWDXM1 BLDQRSP  (.LST,ORIT,FLDS,ISIMO)  ;Build responses for an order
   ; LST -- an OUT parameter
   ;     RETURNED FORMAT: LST=QuickLevel^ResponseID(ORIT,$H)^Dialog^Type^FormID^DGrp
   ;                      LST(n)=verify text or rejection text.
   ; ORIT = PTR to 101.41 for quick order, 100 for copy
   ;    1  2 3 4 5 6 7 8                   11-20
   ; FLDS=DFN^LOC^ORNP^INPT^SEX^AGE^EVENT^SC%^^^Key Variables...
   ; ISIMO -- I think: IS INPATIENT MEDICATION ON OUTPATIENT

 Params ------------------------------------------------------------------
 literal	147           
 literal	70685^6^73^0^M^4^0;C;0;0^0^^^
 literal	0

 Results -----------------------------------------------------------------
 0^0^147^D^140^4


 ORWDPS32 AUTH  ;"For inpatient meds, check restrictions

 Params ------------------------------------------------------------------
 literal	73

 Results -----------------------------------------------------------------
 0


 ORWDX DLGDEF (LST,DLG)  ;Format mapping for a Dlg.

 Params ------------------------------------------------------------------
 literal	PSO OERR

 Results -----------------------------------------------------------------
 ORDERABLE^4^1^@1350^^^^^^384~
 INSTR^136^^^^^^^^137~170~153~388~386~
 ROUTE^137^^1~3^^^^^^^1
 SCHEDULE^170^^^^^^^^^1
 URGENCY^7^6^^ROUTINE DONE
 COMMENT^15^7
 STRENGTH^384^^@1350^^^^^^^1
 QTY^149^8^^^Quantity:^^1
 PICKUP^148^
 REFILLS^150^9^^^Refills:
 SC^151^
 DAYS^153^^^^FOR^^^^^1
 START^6^
 SIG^385^2^^^^^1^0
 DOSE^386^^@^^^^^^^1
 DRUG^138^
 SUPPLY^387^
 NAME^1350^1.5
 CONJ^388^^^^^^^^^1
 PI^1358^3
 NOW^1359^10^^^First Dose^^1


 ORWDPS1 SCHALL   ;return all schedules

 Params ------------------------------------------------------------------

 Results -----------------------------------------------------------------
 BID^TWICE A DAY^C
 MO-WE-FR^^C
 NOW^^O
 ONCE^^O
 Q12H^EVERY 12 HOURS^C
 Q24H^EVERY 24 HOURS^C
 Q2H^EVERY 2 HOURS^C
 Q3H^EVERY 3 HOURS^C
 Q4H^EVERY 4 HOURS^C
 Q6H^EVERY 6 HOURS^C
 Q8H^EVERY 8 HOURS^C
 QAM^EVERY MORNING^C
 QD^EVERY DAY^C
 QHS^AT BEDTIME^C
 QID^FOUR TIMES A DAY^C
 QOD^EVERY OTHER DAY^C
 STAT^^O
 TID^THREE TIMES A DAY^C


 ORWDPS1 ODSLCT   ;return default lists for dialog

 Params ------------------------------------------------------------------
 literal	O
 literal	70685
 literal	6

 Results -----------------------------------------------------------------
 ~Priority
 i2^ASAP
 i99^DONE
 i9^ROUTINE
 i1^STAT
 d9^ROUTINE
 ~DispMsg
 d0
 ~Refills
 d0^0
 ~Pickup
 dW^at Window


 ORIMO IMOLOC    (See above)  ;ORY>=0: LOC is an IMO authorized location

 Params ------------------------------------------------------------------
 literal	6
 literal	70685

 Results -----------------------------------------------------------------
 -1


 ORWDXM3 ISUDQO (ORY,DLGID)  ;True: is unit dose quick order

 Params ------------------------------------------------------------------
 literal	140

 Results -----------------------------------------------------------------
 0


 ORWUL FV4DG (VAL,DGNM) ;return the current full list & item count

 Params ------------------------------------------------------------------
 literal	O RX

 Results -----------------------------------------------------------------
 2^1
 notes: Does lookups in file 101.44


 ORWUL QV4DG  (VAL,DGRP)  ;return the quick order list, given a display group name.

 Params ------------------------------------------------------------------
 literal	O RX

 Results -----------------------------------------------------------------
 0^0
 notes: does lookups in file 100.98 (DISPLAY GROUP file)


 ORWDX DGNM  ;display grp pointer for name

 Params ------------------------------------------------------------------
 literal	O RX

 Results -----------------------------------------------------------------
 4
 notes: does lookups in file 100.98 (DISPLAY GROUP file)


 ORWCH LOADSIZ  ;returns to bounds for a particular control.

 Params ------------------------------------------------------------------
 literal	frmODMeds

 Results -----------------------------------------------------------------
 238,134,566,442


 ORWUL FVSUB (LST,IEN,FIRST,LAST)  ;returns subset of orders in view.

 Params ------------------------------------------------------------------
 literal	2  Note: 2 --> ORWDSET O RX record
 literal	1
 literal	1

 Results -----------------------------------------------------------------
 12^(CALCIUM)
 Notes: returns a..b set members from IEN record in file 101.44 (ORDER QUICK VIEW file)


 ORWCH SAVESIZ   ;save the list of sizing information.

 Params ------------------------------------------------------------------
 literal	frmODMeds
 literal	238,134,566,442

 Results -----------------------------------------------------------------
 0


 ORWDXM2 CLRRCL

 Params ------------------------------------------------------------------

 Results -----------------------------------------------------------------
 1


 ORWDX UNLOCK

 Params ------------------------------------------------------------------
 literal	70685

 Results -----------------------------------------------------------------
 1

Email coorespondence

Wei Wang wrote:

I have tried to enter a new pharmacy orderable items and drugs through the PDM Drug enter/edit program. After the drug is put in, I can order it from the character-based CPRS but it does not display in the Medication Order dialog box for the GUI CPRS.

The only inpatient medication orderable items that display in the GUI CPRS are items contained in the record "ORWDSET UD RX" in the file ORDER

QUICK VIEW. But new updates to the drugs and orderable items do not effect this record. Any idea how I should enter new drugs and/or pharmacy orderable items so they will appear on the GUI CPRS too?

Thanks,

Wei Wang Oleen Healthcare Information Management


The reason was that we didn't start TaskMan while entering the drugs so job of "updating Quick View" is scheduled but not run. After we started TaskMan and waited for a little while, all drugs now show nicely in the GUI interface.

Wei

Thanks to Todd in Iowa who helped us with resolve the problem! Nancy Anthracite

=-=-=-=-=-=-

Hi Finally I am able to see the drugs and order them from CPRS. Nancy's old mail really helped. A record has to be added into the ORDER QUICK VIEW file. This file probably holds the parameters required by CPRS. The new record is something like: Name : ORWDSET O RX QUICK ORDER : PS MEDS SET MEMBER : "ORDERABLE ITEM" Regards Nick



I have been tinkering with being able to order medications in CPRS.

Based on recent posts, it seems that an entry is required in the ORDER QUICK VIEW file, in the record: ORWDSET O RX. Here is my file now:


Select ORDER QUICK VIEW NAME: orwdset O RX ANOTHER ONE: STANDARD CAPTIONED OUTPUT? Yes// (Yes) Include COMPUTED fields: (N/Y/R/B): NO// b BOTH Computed Fields and Record Number (IEN)

NUMBER: 2 NAME: ORWDSET O RX

 LAST UPDATE: 59653,46064

QUICK ORDER: PS MEDS DISPLAY TEXT: <Some text> SET MEMBER: CALCIUM DISPLAY TEXT: (CALCIUM)


Now, rather when getting an error when trying to order a medicine, I am given chose of ordering one "medicine" -- namely calcium.

So it seems that I need to load my formulary into this file.

When I look at the data structure for the file, though, I see that the drug (in this case "calcium") is stored as a free text name, not a pointer to the DRUG file (file # 50).

So how do I make this link, or am I off target?

Thanks Kevin



Hi The SET MEMBER comes from the PHARMACY ORDERABLE ITEM file for medications. Drugs can be added into this file through the DRUG ENTER/EDIT option. Bye Nick


Nick,

Thanks for you help so far.

I have explored the DRUG ENTER/EDIT option (option: PSA DRUG ENTER/EDIT) and found that I could laboriously load up my forumulary with the drugs one at a time -- clearly impossible for a full forumulary (too many)

Then I found the option to Merge National Drug file Datas into Local File (option: PSNMGR). I did this, and there were no errors. Somewhere along the way I created a "pharmacy" out of which to work in the OUTPATIENT SITE file. Now, when I got to the DRUG ENTER/EDIT option, there are 5173 drugs loaded.

But when I go into Fileman, and look inthe PHARMACY ORDERABLE ITEM file, it is completely empty.

Any ideas about how to get this populated?

Thanks Kevin


The pointer is from the Drug file #50 I believe. I got something to work by putting someting into the orderables file. I know there a pointer from the drug file to the orderables file. Jim Gray