Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables  | All
Print Page as PDF
Routine: PSOSPMU1

Package: Outpatient Pharmacy

Routine: PSOSPMU1


Information

PSOSPMU1 ;BIRM/MFR - State Prescription Monitoring Program Utilities ;10/07/12

Source Information

Source file <PSOSPMU1.m>

Call Graph

Call Graph

Call Graph Total: 14

Package Total Call Graph
Kernel 6 ($$FTG,CLOSE,DEL,OPEN)^%ZISH  USE^%ZISUTL  ($$OS,$$VERSION)^%ZOSV  $$NOW^XLFDT  $$UP^XLFSTR  $$DECRYP^XUSRB1  
Outpatient Pharmacy 4 $$NUMERIC^PSOASAP0  ($$RXRLDT,$$RXSTATE)^PSOBPSUT  $$GETNDC^PSONDCUT  ($$FEXIST,$$SCREEN,$$SPOK)^PSOSPMUT  
VA FileMan 3 FILE^DICN  $$GET1^DIQ  ^DIR  
List Manager 1 (CNTRL,SAVE)^VALM10  

Caller Graph

Legends:

Legend of Colors

Package Component Superscript legend

action A extended action Ea event driver Ed subscriber Su protocol O limited protocol LP run routine RR broker B edit E server Se print P screenman SM inquire I

Caller Graph

Caller Graph Total: 11

Package Total Caller Graph
Outpatient Pharmacy 11 PSOSPMB3  PSOSPMKY  PSOSPML0  PSOSPML1  PSOSPML2  PSOSPML3  PSOSPML4  PSOSPML5  
PSOSPML6  PSOSPMSP  PSOSPMUT  

Entry Points

Name Comments DBIA/ICR reference
GATHER(STATE,BEGDTTM,ENDDTTM,RECTYPE,RTSONLY) ; Gathers all CS prescriptions for Data Range
BLDBAT(EXPTYPE,BEGRLDT,ENDRLDT) ; Given a list of Rx's builds a new Export Batch
; Input: (r) EXPTYPE - Export Type ((MA)naul/(SC)heduled/(RX) Single Rx)/(VD) Void Only
; (o) BEGRLDT - Begin Release Date (FM Format) (Required for M and S batches)
; (o) ENDRLDT - End Release Date (FM Format) (Required for M and S batches)
; (r) List of Rx's: ^TMP("PSOSPMRX",$J,STATE,RXIEN,RXFILL)=Record Type ((N)ew/(R)evise/(V)oid)
; Note: This ^TMP global will be cleaned up at the end
LOADRTS(RXIEN,FILL,ARRAY) ; Load ARRAY with Return To Stock Information
GETNDC(RXIEN,FILL) ; Get the SENT NDC for the Return To Stock (VOID) record
PREPFILE(STATE,DATETIME,RTSONLY,DEBUG) ; Prepare Files (FTP Script and Output Data files)
FTPFILE(STATEIP,STATEUSR,LOCDIR,FTPFILE,EXPFILE,INPTFILE,LOGFILE,FTPPORT,DEBUG) ; Issue the Secure FTP command
DELFILES(LOCDIR,EXPFILE,INPTFILE,FTPFILE,LOGFILE) ; Delete Files
PAUSE ; Pauses screen until user hits Return
XVMSDIR(VMSDIR) ; Converts a VMS directory
; Input: VMSDIR - OpenVMS directory name (e.g., "USER$:[SPMP]")
SAVEKEYS(STATE,LOCDIR) ; Saves Key, converts SSH2 to OpenSSH when running on Linux
LINUXDIR() ; Returns the Linux Directory for SPMP sFTP
DIREXIST(DIR) ; Returns whether the Linux Directory for SPMP sFTP already exists
MAKEDIR(DIR) ; Create a new directory
SETLN(NSPC,TEXT,REV,UND,HIG) ; Sets a line to be displayed in the Body section

External References

Name Field # of Occurrence
$$FTG^%ZISH FTPFILE+29
CLOSE^%ZISH PREPFILE+38, PREPFILE+51, PREPFILE+57, SAVEKEYS+10, SAVEKEYS+18, SAVEKEYS+31
DEL^%ZISH DELFILES+20
OPEN^%ZISH PREPFILE+29, PREPFILE+43, PREPFILE+54, SAVEKEYS+6, SAVEKEYS+14, SAVEKEYS+27
USE^%ZISUTL PREPFILE+30, PREPFILE+44, PREPFILE+55, SAVEKEYS+7, SAVEKEYS+15, SAVEKEYS+28
$$OS^%ZOSV PREPFILE+7, FTPFILE+11, DELFILES+8, SAVEKEYS+12, SAVEKEYS+20, LINUXDIR+2, DIREXIST+4, MAKEDIR+3
$$VERSION^%ZOSV LINUXDIR+3, DIREXIST+5, MAKEDIR+4
FILE^DICN BLDBAT+19, BLDBAT+34
$$GET1^DIQ GATHER+25, GATHER+33, BLDBAT+15, BLDBAT+23, BLDBAT+30, BLDBAT+31, PREPFILE+12, PREPFILE+13, PREPFILE+15, PREPFILE+16
, PREPFILE+17, PREPFILE+18, PREPFILE+19, PREPFILE+20, PREPFILE+21, SAVEKEYS+4, SAVEKEYS+22
^DIR PAUSE+1
$$NUMERIC^PSOASAP0 BLDBAT+30
$$RXRLDT^PSOBPSUT GATHER+18, GATHER+36
$$RXSTATE^PSOBPSUT GATHER+20, GATHER+39
$$GETNDC^PSONDCUT BLDBAT+32
$$FEXIST^PSOSPMUT FTPFILE+25, DELFILES+9
$$SCREEN^PSOSPMUT GATHER+19, GATHER+37
$$SPOK^PSOSPMUT BLDBAT+12, PREPFILE+9
CNTRL^VALM10 SETLN+14, SETLN+15, SETLN+16, SETLN+18
SAVE^VALM10 SETLN+11
$$NOW^XLFDT BLDBAT+16
$$UP^XLFSTR FTPFILE+32, LINUXDIR+3, DIREXIST+5, MAKEDIR+4
$$DECRYP^XUSRB1 SAVEKEYS+9, SAVEKEYS+17, SAVEKEYS+30

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Creating Batch #",DINUM," for ",$$GET1^DIQ(58.41,STATE,.01),"..."
  • Line Location: BLDBAT+15
Function Call: WRITE
  • Prompt: "Done."
  • Line Location: BLDBAT+35
Function Call: WRITE
  • Prompt: "put "_$S(PSOOS["UNIX":LOCDIR,1:"")_EXPFILE,!
  • Line Location: PREPFILE+32
Function Call: WRITE
  • Prompt: "exit",!
  • Line Location: PREPFILE+37
Function Call: WRITE
  • Prompt: "$ SET VERIFY=(PROCEDURE,IMAGE)",!
  • Line Location: PREPFILE+47
Function Call: WRITE
  • Prompt: "$ SET DEFAULT "_LOCDIR,!
  • Line Location: PREPFILE+48
Function Call: WRITE
  • Prompt: "$ sftp"_$S($G(DEBUG):" -""D3""",1:"")_$S(FTPPORT:" -oPort="_FTPPORT,1:"")_" -oIdentityFile="""_$$XVMSDIR(LOCDIR)_"VMSSSHID."" -""B"" "_INPTFILE_" -oUser="_FTPUSR_" "_FTPIP,!
  • Line Location: PREPFILE+49
Function Call: WRITE
  • Prompt: "$ exit",!
  • Line Location: PREPFILE+50
Function Call: WRITE
  • Prompt: "IDKEY "_$$XVMSDIR(LOCDIR)_"VMSSSHKEY"
  • Line Location: PREPFILE+56
Function Call: WRITE
  • Prompt: !
  • Line Location: PAUSE+1
Function Call: WRITE
  • Prompt: $$DECRYP^XUSRB1(^PS(58.41,STATE,"PRVKEY",WLINE,0)),!
  • Line Location: SAVEKEYS+9
Function Call: WRITE
  • Prompt: $$DECRYP^XUSRB1(^PS(58.41,STATE,"PUBKEY",WLINE,0)),!
  • Line Location: SAVEKEYS+17
Function Call: WRITE
  • Prompt: $$DECRYP^XUSRB1(^PS(58.41,STATE,"PRVKEY",WLINE,0)),!
  • Line Location: SAVEKEYS+30
Routine Call
  • DIR
  • Line Location:
    • PAUSE+1

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^PSDRUG - [#50] GET1^DIQ
^PSRX - [#52] GET1^DIQ
52.07 GET1^DIQ
^PS(58.41 - [#58.41] GET1^DIQ
^PS(58.42 - [#58.42] Classic Fileman Calls

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^DD("DILOCKTM" BLDBAT+13
^PS(58.41 - [#58.41] SAVEKEYS+8, SAVEKEYS+9, SAVEKEYS+16, SAVEKEYS+17, SAVEKEYS+29, SAVEKEYS+30
^PS(58.42 - [#58.42] GATHER+35, BLDBAT+13, BLDBAT+14, BLDBAT+20, GETNDC+7, GETNDC+8, GETNDC+9
^PSRX - [#52] GATHER+14, GATHER+15, GATHER+16, LOADRTS+6, LOADRTS+7, LOADRTS+9
^PSRX("ARTS" GATHER+30, GATHER+31, GATHER+32
^TMP( SETLN+9*
^TMP("PSOFTPLG" FTPFILE+28!, FTPFILE+29, FTPFILE+31, FTPFILE+32
^TMP("PSOSPMRX" GATHER+9!, GATHER+21*, GATHER+38, GATHER+40*, BLDBAT+8, BLDBAT+11, BLDBAT+22, BLDBAT+24, BLDBAT+26, BLDBAT+36!

Label References

Name Line Occurrences
$$DIREXIST MAKEDIR+5
$$GETNDC BLDBAT+28, LOADRTS+10
$$XVMSDIR PREPFILE+49, PREPFILE+56
SAVEKEYS PREPFILE+59

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
% BLDBAT+7~
ARRAY LOADRTS~, LOADRTS+5!
ARRAY("DAYSUP" LOADRTS+15*
ARRAY("DIVISION" LOADRTS+11*
ARRAY("NDC" LOADRTS+13*
ARRAY("PRVIEN" LOADRTS+17*
ARRAY("QTY" LOADRTS+14*
ARRAY("RELDTTM" LOADRTS+12*
ARRAY("RPHIEN" LOADRTS+16*
BATCH GETNDC+4~, GETNDC+7*, GETNDC+8, GETNDC+9
BATCHIEN BLDBAT+7~, BLDBAT+11, BLDBAT+12*, BLDBAT+14*, BLDBAT+21*, BLDBAT+25, BLDBAT+37
BEGDTTM GATHER~, GATHER+13, GATHER+28
BEGRLDT BLDBAT~, BLDBAT+17, BLDBAT+18
CURDIR LINUXDIR+1~, LINUXDIR+5
DA BLDBAT+7~, BLDBAT+25!
DA(1 BLDBAT+25*
DATETIME PREPFILE~, PREPFILE+23, PREPFILE+24, PREPFILE+25, PREPFILE+26, PREPFILE+61
DD BLDBAT+7~, BLDBAT+19!, BLDBAT+34!
DEBUG PREPFILE~, PREPFILE+49, FTPFILE~, FTPFILE+14
DIC BLDBAT+7~, BLDBAT+16*, BLDBAT+25!*
DIC("DR" BLDBAT+16*, BLDBAT+18*, BLDBAT+33*
DIC(0 BLDBAT+16*, BLDBAT+25*
DINUM BLDBAT+7~, BLDBAT+14*, BLDBAT+15, BLDBAT+16, BLDBAT+25!
DIR PAUSE+1!, DIREXIST~, DIREXIST+3, DIREXIST+6*, MAKEDIR~, MAKEDIR+5
DIR("A" PAUSE+1*
DIR(0 PAUSE+1*
DIREXIST DIREXIST+2~, DIREXIST+8
DLAYGO BLDBAT+7~, BLDBAT+19*, BLDBAT+34*
DO BLDBAT+7~, BLDBAT+19!, BLDBAT+34!
DR BLDBAT+7~
DRUGIEN BLDBAT+7~, BLDBAT+23*, BLDBAT+30, BLDBAT+31
ENDDTTM GATHER~, GATHER+13, GATHER+28
ENDRLDT GATHER+13*, GATHER+14, BLDBAT~, BLDBAT+18
ENDRTSDT GATHER+8~, GATHER+28*, GATHER+29*, GATHER+30
ERROR FTPFILE+23~, FTPFILE+25*, FTPFILE+28*, FTPFILE+31, FTPFILE+32*, FTPFILE+34
EXPFILE PREPFILE+5~, PREPFILE+26*, PREPFILE+27*, PREPFILE+32, PREPFILE+34, PREPFILE+35, PREPFILE+61, FTPFILE~, FTPFILE+25, DELFILES~
, DELFILES+9
EXPTYPE BLDBAT~, BLDBAT+15, BLDBAT+16, BLDBAT+35
FILE2DEL DELFILES+6~
FILE2DEL( DELFILES+9*, DELFILES+10*, DELFILES+11*, DELFILES+13*
FILE2DEL("VMSSSHID." DELFILES+14*
FILE2DEL("VMSSSHKEY" DELFILES+18*
FILE2DEL("VMSSSHKEY." DELFILES+15*
FILE2DEL("VMSSSHKEY.PUB" DELFILES+16*
FILE2DEL("linuxsshkey" DELFILES+19*
FILEARR FTPFILE+23~
FILEXT PREPFILE+5~, PREPFILE+16*, PREPFILE+26, PREPFILE+34, PREPFILE+61
FILL GATHER+8~, GATHER+17*, GATHER+18, GATHER+19, GATHER+21, GATHER+33*, GATHER+35, GATHER+36, GATHER+37, GATHER+38
, GATHER+40, BLDBAT+7~, BLDBAT+10*, BLDBAT+24*, BLDBAT+26, BLDBAT+28, BLDBAT+32, BLDBAT+33, LOADRTS~, LOADRTS+8
, LOADRTS+10, GETNDC~, GETNDC+5, GETNDC+7, GETNDC+8
FTPDIR PREPFILE+5~, PREPFILE+21*, PREPFILE+31
FTPFILE PREPFILE+5~, PREPFILE+24*, PREPFILE+42, PREPFILE+43, PREPFILE+61, FTPFILE~, FTPFILE+12, DELFILES~, DELFILES+13
FTPIP PREPFILE+5~, PREPFILE+18*, PREPFILE+49
FTPPORT PREPFILE+5~, PREPFILE+20*, PREPFILE+49, FTPFILE~, FTPFILE+14
FTPUSR PREPFILE+5~, PREPFILE+19*, PREPFILE+49
GATHER GATHER+8~, GATHER+9*, GATHER+22*, GATHER+25, GATHER+41*, GATHER+42
GETRSNDC GETNDC+4~, GETNDC+6*, GETNDC+7, GETNDC+8, GETNDC+10*, GETNDC+11
HIG SETLN~, SETLN+17, SETLN+18
INPTFILE PREPFILE+5~, PREPFILE+23*, PREPFILE+29, PREPFILE+39, PREPFILE+49, PREPFILE+61, FTPFILE~, FTPFILE+14, DELFILES~, DELFILES+10
>> IOINHI SETLN+18
>> IOINORM SETLN+14, SETLN+15, SETLN+16, SETLN+18
>> IORVOFF SETLN+14
>> IORVON SETLN+14
>> IOUON SETLN+15, SETLN+16, SETLN+18
LINE FTPFILE+27~, FTPFILE+30*, FTPFILE+32*, SETLN+9*, SETLN+11, SETLN+14, SETLN+15, SETLN+16, SETLN+18
LOCDIR PREPFILE+5~, PREPFILE+12*, PREPFILE+13*, PREPFILE+29, PREPFILE+32, PREPFILE+33, PREPFILE+42, PREPFILE+43, PREPFILE+48, PREPFILE+49
, PREPFILE+53, PREPFILE+54, PREPFILE+56, PREPFILE+59, PREPFILE+61, FTPFILE~, FTPFILE+12, FTPFILE+14, FTPFILE+15, FTPFILE+25
, FTPFILE+29, DELFILES~, DELFILES+7, DELFILES+9, DELFILES+20, SAVEKEYS~, SAVEKEYS+6, SAVEKEYS+14, SAVEKEYS+23, SAVEKEYS+27
, SAVEKEYS+32
LOG FTPFILE+27~, FTPFILE+30*, FTPFILE+31*, FTPFILE+32
LOGFILE PREPFILE+5~, PREPFILE+25*, PREPFILE+61, FTPFILE~, FTPFILE+12, FTPFILE+15, FTPFILE+29, DELFILES~, DELFILES+11
MKDIR MAKEDIR+2~, MAKEDIR+7
NDC BLDBAT+7~, BLDBAT+28*, BLDBAT+31*, BLDBAT+32*, BLDBAT+33, LOADRTS+4~, LOADRTS+10*, LOADRTS+13
NODE0 LOADRTS+4~, LOADRTS+7*, LOADRTS+8, LOADRTS+10, LOADRTS+11, LOADRTS+14, LOADRTS+15, LOADRTS+16
NODE1 LOADRTS+4~, LOADRTS+9*, LOADRTS+12, LOADRTS+17
NSPC SETLN~, SETLN+9
>> POP PREPFILE+29, PREPFILE+39, PREPFILE+42, PREPFILE+53
PREFIX PREPFILE+5~, PREPFILE+15*, PREPFILE+26, PREPFILE+61
>> PSOLSTLN SETLN+11*
PSOOS PREPFILE+5~, PREPFILE+7*, PREPFILE+12, PREPFILE+13, PREPFILE+24, PREPFILE+32, PREPFILE+33, PREPFILE+35, PREPFILE+42, PREPFILE+46
, PREPFILE+53, FTPFILE+10~, FTPFILE+11*, FTPFILE+12, FTPFILE+13, FTPFILE+25, FTPFILE+26, DELFILES+6~, DELFILES+8*, DELFILES+12
, DELFILES+17
PV FTPFILE+10~, FTPFILE+20
RECTYPE GATHER~, GATHER+21, BLDBAT+7~, BLDBAT+26*, BLDBAT+27, BLDBAT+33
RENAME PREPFILE+5~, PREPFILE+17*, PREPFILE+26, PREPFILE+34
REV SETLN~, SETLN+13
ROOTDIR LINUXDIR+1~, LINUXDIR+5*, LINUXDIR+6*, LINUXDIR+7
RTSDT GATHER+8~, GATHER+28*, GATHER+30*, GATHER+31, GATHER+32
RTSIEN GATHER+32*, GATHER+33, LOADRTS+4~, LOADRTS+5*, LOADRTS+6*, LOADRTS+7, LOADRTS+9
RTSONLY GATHER~, GATHER+11, GATHER+25, PREPFILE~, PREPFILE+27
RX BLDBAT+7~, BLDBAT+10*, BLDBAT+22*, BLDBAT+23, BLDBAT+24, BLDBAT+26, BLDBAT+28, BLDBAT+32, BLDBAT+33
RXFILL GATHER+8~, GATHER+16*, GATHER+17
RXIEN GATHER+8~, GATHER+15*, GATHER+16, GATHER+18, GATHER+19, GATHER+20, GATHER+21, GATHER+31*, GATHER+32, GATHER+33
, GATHER+35, GATHER+36, GATHER+37, GATHER+38, GATHER+39, GATHER+40, LOADRTS~, LOADRTS+6, LOADRTS+7, LOADRTS+9
, LOADRTS+10, GETNDC~, GETNDC+5, GETNDC+7, GETNDC+8
RXREC GETNDC+4~, GETNDC+8*, GETNDC+9
RXREC0 GETNDC+4~, GETNDC+9*, GETNDC+10
RXRLDT GATHER+8~, GATHER+13*, GATHER+14*, GATHER+15, GATHER+16
SPOK BLDBAT+7~
STATE GATHER~, GATHER+20, GATHER+21, GATHER+25, GATHER+38, GATHER+39, GATHER+40, BLDBAT+7~, BLDBAT+10*, BLDBAT+11*
, BLDBAT+12, BLDBAT+15, BLDBAT+16, BLDBAT+22, BLDBAT+24, BLDBAT+26, PREPFILE~, PREPFILE+9, PREPFILE+12, PREPFILE+13
, PREPFILE+15, PREPFILE+16, PREPFILE+17, PREPFILE+18, PREPFILE+19, PREPFILE+20, PREPFILE+21, PREPFILE+59, SAVEKEYS~, SAVEKEYS+4
, SAVEKEYS+8, SAVEKEYS+9, SAVEKEYS+16, SAVEKEYS+17, SAVEKEYS+22, SAVEKEYS+29, SAVEKEYS+30
STATEIP FTPFILE~, FTPFILE+15
STATEUSR FTPFILE~, FTPFILE+15
TEXT SETLN~, SETLN+7*, SETLN+8*, SETLN+9, SETLN+14, SETLN+15
UND SETLN~, SETLN+15, SETLN+16, SETLN+18
VMSDIR XVMSDIR~, XVMSDIR+3
WLINE SAVEKEYS+3~, SAVEKEYS+8*, SAVEKEYS+9, SAVEKEYS+16*, SAVEKEYS+17, SAVEKEYS+29*, SAVEKEYS+30
X BLDBAT+7~, BLDBAT+16*, BLDBAT+33*, SETLN+6~
XLOG FTPFILE+27~, FTPFILE+29*
XPV SAVEKEYS+3~, SAVEKEYS+23*, SAVEKEYS+24, SAVEKEYS+32*, SAVEKEYS+33
XPV1 FTPFILE+10~, FTPFILE+12*, FTPFILE+14*, FTPFILE+15*, FTPFILE+17
XREF GATHER+8~, GATHER+12*, GATHER+14, GATHER+15, GATHER+16, GATHER+17
XX BLDBAT+7~, BLDBAT+12*
Y BLDBAT+7~, BLDBAT+21
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Local Variables  | All