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: 16

Package Total Call Graph
Kernel 6 ($$FTG,CLOSE,DEL,OPEN)^%ZISH  USE^%ZISUTL  ($$OS,$$VERSION)^%ZOSV  $$NOW^XLFDT  $$UP^XLFSTR  $$DECRYP^XUSRB1  
Outpatient Pharmacy 6 $$NUMERIC^PSOASAP0  ($$RXRLDT,$$RXSITE,$$RXSTATEP,$$RXSTATEZ)^PSOBPSUT  $$GETNDC^PSONDCUT  $$FILTER^PSOSPML7  ($$FEXIST,$$SCREEN,$$SPOK)^PSOSPMUT  $$VOIDST^PSOSPMV  
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: 16

Package Total Caller Graph
Outpatient Pharmacy 16 PSOERCR0  PSOERXU1  PSOSPMB3  PSOSPMKY  PSOSPML0  PSOSPML1  PSOSPML2  PSOSPML3  
PSOSPML4  PSOSPML5  PSOSPML6  PSOSPML7  PSOSPML8  PSOSPMSP  PSOSPMUT  PSOSPMV  

Entry Points

Name Comments DBIA/ICR reference
GATHER(STATE,BEGDTTM,ENDDTTM,RECTYPE,RTSONLY,LIST) ; 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/(ZR) Zero Report
; (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+20, BLDBAT+35
$$GET1^DIQ GATHER+29, GATHER+39, GATHER+47, BLDBAT+15, BLDBAT+24, BLDBAT+31, BLDBAT+32, PREPFILE+12, PREPFILE+13, PREPFILE+15
, PREPFILE+16, PREPFILE+17, PREPFILE+18, PREPFILE+19, PREPFILE+20, PREPFILE+21, SAVEKEYS+4, SAVEKEYS+22
^DIR PAUSE+2
$$NUMERIC^PSOASAP0 BLDBAT+31
$$RXRLDT^PSOBPSUT GATHER+42
$$RXSITE^PSOBPSUT GATHER+23, GATHER+45
$$RXSTATEP^PSOBPSUT GATHER+24, GATHER+50
$$RXSTATEZ^PSOBPSUT GATHER+23, GATHER+45
$$GETNDC^PSONDCUT BLDBAT+33
$$FILTER^PSOSPML7 GATHER+21
$$FEXIST^PSOSPMUT FTPFILE+25, DELFILES+9
$$SCREEN^PSOSPMUT GATHER+22, GATHER+43
$$SPOK^PSOSPMUT BLDBAT+12, PREPFILE+9
$$VOIDST^PSOSPMV GATHER+48
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+36
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+2
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+2

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+41, BLDBAT+13, BLDBAT+14, BLDBAT+21, GETNDC+7, GETNDC+8, GETNDC+9
^PSRX - [#52] GATHER+17, GATHER+18, GATHER+19, LOADRTS+6, LOADRTS+7, LOADRTS+9
^PSRX("ARTS" GATHER+36, GATHER+37, GATHER+38
^TMP( SETLN+9*
^TMP("PSOFTPLG" FTPFILE+28!, FTPFILE+29, FTPFILE+31, FTPFILE+32
^TMP("PSOSPMRX" GATHER+11!, GATHER+25*, GATHER+44, GATHER+49*, GATHER+51*, BLDBAT+8, BLDBAT+11, BLDBAT+23, BLDBAT+25, BLDBAT+27
, BLDBAT+37!
^TMP("PSOSPMST" GATHER+11!, GATHER+23*, GATHER+45*
^XUSEC("PSO SPMP ADMIN" BLDBAT+17

Label References

Name Line Occurrences
$$DIREXIST MAKEDIR+6
$$GETNDC BLDBAT+29, 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+22*, BLDBAT+26, BLDBAT+38
BEGDTTM GATHER~, GATHER+16, GATHER+34
BEGRLDT BLDBAT~, BLDBAT+18, BLDBAT+19
CURDIR LINUXDIR+1~, LINUXDIR+6
DA BLDBAT+7~, BLDBAT+26!
DA(1 BLDBAT+26*
DATETIME PREPFILE~, PREPFILE+23, PREPFILE+24, PREPFILE+25, PREPFILE+26, PREPFILE+61
DD BLDBAT+7~, BLDBAT+20!, BLDBAT+35!
DEBUG PREPFILE~, PREPFILE+49, FTPFILE~, FTPFILE+14
DIC BLDBAT+7~, BLDBAT+16*, BLDBAT+26!*
DIC("DR" BLDBAT+16*, BLDBAT+17*, BLDBAT+19*, BLDBAT+34*
DIC(0 BLDBAT+16*, BLDBAT+26*
DINUM BLDBAT+7~, BLDBAT+14*, BLDBAT+15, BLDBAT+16, BLDBAT+26!
DIR PAUSE+1~, DIREXIST~, DIREXIST+3, DIREXIST+7*, MAKEDIR~, MAKEDIR+6
DIR("A" PAUSE+2*
DIR(0 PAUSE+2*
DIREXIST DIREXIST+2~, DIREXIST+9
DLAYGO BLDBAT+7~, BLDBAT+20*, BLDBAT+35*
DO BLDBAT+7~, BLDBAT+20!, BLDBAT+35!
DR BLDBAT+7~
DRUGIEN BLDBAT+7~, BLDBAT+24*, BLDBAT+31, BLDBAT+32
DUZ BLDBAT+17
ENDDTTM GATHER~, GATHER+16, GATHER+34
ENDRLDT GATHER+16*, GATHER+17, BLDBAT~, BLDBAT+19
ENDRTSDT GATHER+10~, GATHER+34*, GATHER+35*, GATHER+36
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+36
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+10~, GATHER+20*, GATHER+21, GATHER+22, GATHER+25, GATHER+39*, GATHER+41, GATHER+42, GATHER+43, GATHER+44
, GATHER+48, GATHER+49, GATHER+51, BLDBAT+7~, BLDBAT+10*, BLDBAT+25*, BLDBAT+27, BLDBAT+29, BLDBAT+33, BLDBAT+34
, 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+10~, GATHER+11*, GATHER+26*, GATHER+29, GATHER+31, GATHER+49*, GATHER+53*, GATHER+54
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
LIST GATHER~, GATHER+12*, GATHER+21, GATHER+31
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
MBMST GATHER+46~, GATHER+47*, GATHER+48
MKDIR MAKEDIR+2~, MAKEDIR+8
NDC BLDBAT+7~, BLDBAT+29*, BLDBAT+32*, BLDBAT+33*, BLDBAT+34, 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
PSOVER LINUXDIR+1~, LINUXDIR+3*, LINUXDIR+4, DIREXIST+2~, DIREXIST+5*, DIREXIST+6, MAKEDIR+2~, MAKEDIR+4*, MAKEDIR+5
PV FTPFILE+10~, FTPFILE+20
RECTYPE GATHER~, GATHER+25, BLDBAT+7~, BLDBAT+27*, BLDBAT+28, BLDBAT+34
RENAME PREPFILE+5~, PREPFILE+17*, PREPFILE+26, PREPFILE+34
REV SETLN~, SETLN+13
ROOTDIR LINUXDIR+1~, LINUXDIR+6*, LINUXDIR+7*, LINUXDIR+8
RTSDT GATHER+10~, GATHER+34*, GATHER+36*, GATHER+37, GATHER+38
RTSIEN GATHER+38*, GATHER+39, LOADRTS+4~, LOADRTS+5*, LOADRTS+6*, LOADRTS+7, LOADRTS+9
RTSONLY GATHER~, GATHER+14, GATHER+29, PREPFILE~, PREPFILE+27
RX BLDBAT+7~, BLDBAT+10*, BLDBAT+23*, BLDBAT+24, BLDBAT+25, BLDBAT+27, BLDBAT+29, BLDBAT+33, BLDBAT+34
RXFILL GATHER+10~, GATHER+19*, GATHER+20
RXIEN GATHER+10~, GATHER+18*, GATHER+19, GATHER+21, GATHER+22, GATHER+23, GATHER+24, GATHER+25, GATHER+37*, GATHER+38
, GATHER+39, GATHER+41, GATHER+42, GATHER+43, GATHER+44, GATHER+45, GATHER+48, GATHER+49, GATHER+50, GATHER+51
, 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+10~, GATHER+16*, GATHER+17*, GATHER+18, GATHER+19
SPOK BLDBAT+7~
STATE GATHER~, GATHER+23, GATHER+24, GATHER+25, GATHER+29, GATHER+44, GATHER+45, GATHER+47, GATHER+49, GATHER+50
, GATHER+51, BLDBAT+7~, BLDBAT+10*, BLDBAT+11*, BLDBAT+12, BLDBAT+15, BLDBAT+16, BLDBAT+23, BLDBAT+25, BLDBAT+27
, 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
STATECK GATHER+46~, GATHER+48*, GATHER+49
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+34*, 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+10~, GATHER+15*, GATHER+17, GATHER+18, GATHER+19, GATHER+20
XX BLDBAT+7~, BLDBAT+12*
Y BLDBAT+7~, BLDBAT+22
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