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

Package: Outpatient Pharmacy

Routine: PSOSPMUT


Information

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

Source Information

Source file <PSOSPMUT.m>

Entry Points

Name Comments DBIA/ICR reference
EXPORT(BATCHIEN,MODE,BCKGRND,DEBUG,FLUSH) ; Export a SPMP Batch
WRITELEV(LEVEL,ARRAY) ; Write the ASAP Segments for each Level
WRITESEG(SEGID,LEVEL,ARRAY) ; Write the ASAP segment to the file
WRITEELM(SEGID,ELMPOS,ARRAY) ; Write the ASAP Data Element to file
SEGCOUNT(LEVEL) ; Keeps track of Segment Count for TP and TT info
ERROR ; Error Trap Handling to catch errors on user-entered M SET expressions
SCREEN(RXIEN,FILLNUM) ; Screens Rx's from being sent to the State
; Input: RXIEN - PRESCRIPTION file (#52) IEN
; FILLNUM - Fill Number
CSRX(RXIEN) ; Controlled Substance Rx?
; Input: RXIEN - PRESCRIPTION file (#52) pointer
ADMCLN(RXIEN,FILL) ; Returns whether the fill was administered in clinic or not
; Input: (r) RXIEN - Rx IEN (#52)
; (o) FILL - Refill #
; Output: 1 - Yes (Administered in Clinic) / 0 - No
SPOK(STATE) ; State Parameters OK?
; Input: STATE - STATE file (#5) pointer
SETNAME(DFN) ; Set array variable PSONAME with Patient name
LOGERROR(BATCHIEN,STATEIEN,ERROR,BCKGRND,LOGFILE) ; Log/Display an error in the transmission
PREIEN(RECTYPE,RXIEN,FILLNUM) ; Returns the Provider IEN
RPHIEN(RECTYPE,RXIEN,FILLNUM) ; Returns the Pharmacist IEN
FEXIST(DIR,FILE) ; Check if a File exists
; Input: DIR - Name of the directory where the file is located
; FILE - Name of the file to be checked
ESC(VALUE) ; Removes Control Characters from the Data Element Value

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Exporting Batch #",BATCHIEN,":",!
  • Line Location: EXPORT+37
Function Call: WRITE
  • Prompt: !,XX,!
  • Line Location: EXPORT+63
Function Call: WRITE
  • Prompt: $$ASAP95^PSOASAP0(RXIEN,+FILLNUM),!
  • Line Location: EXPORT+92
Function Call: WRITE
  • Prompt: "Done."
  • Line Location: EXPORT+130
Function Call: WRITE
  • Prompt: !,XX
  • Line Location: EXPORT+132
Function Call: WRITE
  • Prompt: !!,"Transmitting file to the State (",$$GET1^DIQ(58.41,STATEIEN,7),")...",!
  • Line Location: EXPORT+137
Function Call: WRITE
  • Prompt: !?8,"lines then right-click the mouse and select 'Copy').",!
  • Line Location: EXPORT+143
Function Call: WRITE
  • Prompt: !,"put "_$S(PSOOS["VMS":$$XVMSDIR^PSOSPMU1(LOCDIR),1:LOCDIR)_EXPFILE
  • Line Location: EXPORT+145
Function Call: WRITE
  • Prompt: !,"exit",!
  • Line Location: EXPORT+147
Function Call: WRITE
  • Prompt: !!,"Step 3: Enter the sFTP password and press <RETURN>"
  • Line Location: EXPORT+149
Function Call: WRITE
  • Prompt: !!,"Step 4: Once you get the 'sftp>' prompt, paste the text copied on step 2"
  • Line Location: EXPORT+150
Function Call: WRITE
  • Prompt: !?8,"(right-click the mouse and select 'Paste').",!!
  • Line Location: EXPORT+151
Function Call: WRITE
  • Prompt: !!,"File Successfully Transmitted.",!
  • Line Location: EXPORT+159
Function Call: WRITE
  • Prompt: !
  • Line Location: EXPORT+164
Function Call: WRITE
  • Prompt: ?$S(LEVEL<5:((LEVEL-1)*3),LEVEL=5:3,1:0)
  • Line Location: WRITESEG+6
Function Call: WRITE
  • Prompt: SEGID
  • Line Location: WRITESEG+8
Function Call: WRITE
  • Prompt: $P(@ARRAY,"^",2)
  • Line Location: WRITESEG+13
Function Call: WRITE
  • Prompt: $P(@ARRAY,"^",3)
  • Line Location: WRITESEG+19
Function Call: WRITE
  • Prompt: "?"
  • Line Location: WRITEELM+7
Function Call: WRITE
  • Prompt: VALUE
  • Line Location: WRITEELM+21
Function Call: WRITE
  • Prompt: !!,ERROR,!,$C(7)
  • Line Location: LOGERROR+6

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DPT - [#2] GET1^DIQ
^VA(20 - [#20] GET1^DIQ
^DIC(5 - [#5] GET1^DIQ
^PSDRUG - [#50] GET1^DIQ
^PSRX - [#52] GET1^DIQ
52.1 GET1^DIQ
^PS(58.41 - [#58.41] GET1^DIQ
^PS(58.42 - [#58.42] Classic Fileman Calls,  GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call