Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call
Print Page as PDF
Routine: PSDOPT0

Package: Controlled Substances

Routine: PSDOPT0


Information

PSDOPT0 ;BIR/JPW,LTL,BJW - Outpatient Rx Entry (cont'd) ;Jun 22, 1998@12:15

Source Information

Source file <PSDOPT0.m>

Entry Points

Name Comments DBIA/ICR reference
LOOP ;loop to find new, refills and partials
PSDDAVE ;PSD*3*30 (Major overhaul, Dave B)
RFLCHK ;
PRTLCHK
CHKALL ;Check to see if any left to post or release
PSDREPR(PSDRXIN) ; p93
; Function should return zero to kill PSDSEL("OR") and RXNUM("OR") arrays
PSDRTS(PSDRX,PSDNUM,PSDSITE,PSDQTY) ; API for Outpatient Pharmacy; Patch PSD*3*30
; This subroutine is called each time an Rx is returned to stock
; in Outpatient Pharmacy. The code does the following:
; 1.Check Rx, quit if not a controlled substance.
; 2.Give the user the option to update the transaction and
; balance details
1 ;begin process
POSTED ;check to see if posted
ESIG
ASK
LOCATION
FND1
FIND1
DIE
RETERR
RTSCHK ;Check to see if already returned to stock.
ERRMSG
RTSMUL
PSDS(RXIEN,FLNUM) ; Returns the Vault where the fill was last dispensed from or 0 (none)

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Accessing the prescription history..."
  • Line Location: LOOP+1
Function Call: WRITE
  • Prompt: !!,"Refill #",JJ," suspended."
  • Line Location: LOOP+8
Function Call: WRITE
  • Prompt: !!,"Partial #",JJ," suspended."
  • Line Location: LOOP+17
Function Call: WRITE
  • Prompt: !!,"Original suspended."
  • Line Location: LOOP+25
Function Call: WRITE
  • Prompt: !!,"ALL FILLS FOR THIS PRESCRIPTION HAVE BEEN POSTED AND RELEASED."
  • Line Location: CHKALL+2
Function Call: WRITE
  • Prompt: !,"Sorry you do not possess the PSDMGR key"
  • Line Location: 1+11
Function Call: WRITE
  • Prompt: !!,"Could not find any posting information in the Controlled Substance package,",!,"balance cannot be updated",!
  • Line Location: POSTED+13
Function Call: WRITE
  • Prompt: !,"No signature code entered, RX not returned to stock."
  • Line Location: ESIG+0
Function Call: WRITE
  • Prompt: !,"An Electronic Signature Code is required to return a Controlled Substance RX to stock.",!
  • Line Location: ESIG+1
Function Call: WRITE
  • Prompt: !,"No selection made, no balance adjusted."
  • Line Location: LOCATION+2
Function Call: WRITE
  • Prompt: !!?5,"Prescription Not Returned to Stock!",$C(7),!
  • Line Location: LOCATION+2
Function Call: WRITE
  • Prompt: !,"The Vault is required. Please, select a valid Vault or '^' to exit.",$C(7),!
  • Line Location: LOCATION+3
Function Call: WRITE
  • Prompt: !,"Sorry, the location type must be a Master Vault, satellite or narcotic location."
  • Line Location: LOCATION+4
Function Call: WRITE
  • Prompt: !,"Sorry, the drug is not stocked in this vault."
  • Line Location: LOCATION+5
Function Call: WRITE
  • Prompt: !,"Previous Balance: ",$G(PSDBAL)_" New Balance: "_($G(PSDBAL)+PSDQTY)
  • Line Location: LOCATION+6
Function Call: WRITE
  • Prompt: !,"Updating balances"
  • Line Location: LOCATION+8
Function Call: WRITE
  • Prompt: "."
  • Line Location: LOCATION+12
Function Call: WRITE
  • Prompt: !!?8,"According to the Controlled Substances package, this fill/refill",!?8,"was returned to stock on "_PSDRTS(1)_" by "_$G(PSDUSER)_".",!?16,"Nothing updated in the Controlled Substances package."
  • Line Location: ERRMSG+1

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSD(58.8 - [#58.8] Classic Fileman Calls
^PSD(58.81 - [#58.81] Classic Fileman Calls,  GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call