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

Package: Outpatient Pharmacy

Routine: PSONVAR1


Information

PSONVAR1 ;BHM/MFR - Non-VA Med Usage Report ;Mar 13, 2020@16:01:15

Source Information

Source file <PSONVAR1.m>

Call Graph

Call Graph

Call Graph Total: 6

Package Total Call Graph
Kernel 2 ^%ZISC  ($$FMTE,$$NOW)^XLFDT  
VA FileMan 2 $$GET1^DIQ  ^DIR  
Outpatient Pharmacy 1 $$DEAD^PSONVARP  
Registration 1 (ADD,DEM)^VADPT  

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

Package Total Caller Graph
Outpatient Pharmacy 1 PSONVARP  

Entry Points

Name Comments DBIA/ICR reference
EN
DATE
DFN
ORD
NEXT ; - If not Sorting (already printed), SKIP, otherwise, print the report
NDTP
CLOSE
END
PRINT(DFN,ORD) ; - Print a Non-VA Med Order
PRTDDR ;Print Dispense Drug item(s) including complex orders with conjunctions from SIG multiple
; This multiple replaces using the parent 0 node fields DD, DOSE, MED RTE, & SCHED for printing, However,
; if OLD recorsd found, i.e. no new 55.516 multiple, then use OLD print method for backwards compatibility
TEXT(TEXT,STR,L) ; Formats STR into TEXT array, lines lenght = L
HDR ; - Prints the Header
SRT(ST) ; - Convert the "1,2,4" (example) to "PATIENT,ORDERABLE ITEM,STATUS"
DT(DT) ; - Convert FM Date to MM/DD/YYYY

External References

Name Field # of Occurrence
^%ZISC CLOSE
$$GET1^DIQ ORD+12, ORD+13, PRINT+8, PRINT+9, PRINT+19, PRINT+21, PRINT+43, PRTDDR+18, PRTDDR+19, PRTDDR+20
PRTDDR+21, PRTDDR+25
^DIR HDR+3
$$DEAD^PSONVARP DFN+3
ADD^VADPT PRINT+10
DEM^VADPT PRINT+10
$$FMTE^XLFDT HDR+8
$$NOW^XLFDT HDR+8

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: SP2
  • Line Location: NEXT+12
Function Call: WRITE
  • Prompt: SP1
  • Line Location: NEXT+13
Function Call: WRITE
  • Prompt: !!?18,"********** NO DATA TO PRINT **********"
  • Line Location: NDTP+0
Function Call: WRITE
  • Prompt: SP1
  • Line Location: NDTP+2
Function Call: WRITE
  • Prompt: !,"Total: ",PCNT," patient",$S(PCNT>1:"s",1:"")
  • Line Location: NDTP+3
Function Call: WRITE
  • Prompt: " and ",OCNT," order",$S(OCNT>1:"s",1:""),"."
  • Line Location: NDTP+4
Function Call: WRITE
  • Prompt: !,PNAM," (ID:",$S(PSSN:$P(PSSN,"-",3),1:"0000"),")"
  • Line Location: PRINT+11
Function Call: WRITE
  • Prompt: ?46,"Patient Phone #: ",$E($P(VAPA(8),"^"),1,16)
  • Line Location: PRINT+12
Function Call: WRITE
  • Prompt: !?5,"Non-VA Med: ",OINAM
  • Line Location: PRINT+15
Function Call: WRITE
  • Prompt: ?49,"CPRS Order #: ",$P(XX,"^",8)
  • Line Location: PRINT+18
Function Call: WRITE
  • Prompt: !?2,"Documented By: ",$E($$GET1^DIQ(200,+$P(XX,"^",11),.01),1,29)
  • Line Location: PRINT+19
Function Call: WRITE
  • Prompt: ?46,"Documented Date: ",$$DT($P(XX,"^",10))
  • Line Location: PRINT+20
Function Call: WRITE
  • Prompt: !?9,"Clinic: "
  • Line Location: PRINT+22
Function Call: WRITE
  • Prompt: $E($P(XX,"^",12)_" - "_CLNAM,1,33)
  • Condition for execution: $P(XX,"^",12)
  • Line Location: PRINT+22
Function Call: WRITE
  • Prompt: ?51,"Start Date: ",$$DT($P(XX,"^",9)),!
  • Line Location: PRINT+23
Function Call: WRITE
  • Prompt: ?5,"Indication: ",$P($G(^PS(55,DFN,"NVA",ORD,2)),"^"),!
  • Line Location: PRINT+24
Function Call: WRITE
  • Prompt: !
  • Line Location: PRINT+25
Function Call: WRITE
  • Prompt: !
  • Line Location: PRINT+31
Function Call: WRITE
  • Prompt: ?1,"Order Check #",I,": "
  • Line Location: PRINT+32
Function Call: WRITE
  • Prompt: ?17,TXT(K),!
  • Line Location: PRINT+34
Function Call: WRITE
  • Prompt: !
  • Line Location: PRINT+34
Function Call: WRITE
  • Prompt: ?23,TXT(K),!
  • Line Location: PRINT+41
Function Call: WRITE
  • Prompt: !
  • Line Location: PRINT+41
Function Call: WRITE
  • Prompt: ?6,"Override Provider: "
  • Line Location: PRINT+43
Function Call: WRITE
  • Prompt: $$GET1^DIQ(200,+PRV,.01)
  • Condition for execution: PRV
  • Line Location: PRINT+43
Function Call: WRITE
  • Prompt: !
  • Line Location: PRINT+43
Function Call: WRITE
  • Prompt: !,"Statement/Explanation/Comments: "
  • Line Location: PRINT+48
Function Call: WRITE
  • Prompt: ?32,TXT(K),!
  • Line Location: PRINT+53
Function Call: WRITE
  • Prompt: !
  • Line Location: PRINT+53
Function Call: WRITE
  • Prompt: !?2,"Dispense Drug: ",$E(DGNAM,1,37)
  • Line Location: PRTDDR+7
Function Call: WRITE
  • Prompt: ?55,"Dosage: ",$E($P(XX,"^",3),1,16)
  • Line Location: PRTDDR+8
Function Call: WRITE
  • Prompt: !?7,"Schedule: "
  • Line Location: PRTDDR+9
Function Call: WRITE
  • Prompt: SCH
  • Line Location: PRTDDR+10
Function Call: WRITE
  • Prompt: ?52,"Med Route: ",$E($P(XX,"^",4),1,35)
  • Line Location: PRTDDR+11
Function Call: WRITE
  • Prompt: !?16,$E($P(XX,"^",5),$L(SCH)+1,99)
  • Line Location: PRTDDR+13
Function Call: WRITE
  • Prompt: !?2,"Dispense Drug: ",$E(DGNAM,1,37),?55,"Dosage: ",$E($$GET1^DIQ(55.516,DDR15,"DOSAGE"),1,16)
  • Line Location: PRTDDR+19
Function Call: WRITE
  • Prompt: !
  • Line Location: PRTDDR+19
Function Call: WRITE
  • Prompt: !?7,"Schedule: ",SCH,?52,"Med Route: ",$E($$GET1^DIQ(55.516,DDR15,"MEDICATION ROUTE"),1,35)
  • Line Location: PRTDDR+21
Function Call: WRITE
  • Prompt: !
  • Line Location: PRTDDR+21
Function Call: WRITE
  • Prompt: !?16,$E(SCHX,$L(SCH)+1,99)
  • Line Location: PRTDDR+23
Function Call: WRITE
  • Prompt: !
  • Line Location: PRTDDR+23
Function Call: WRITE
  • Prompt: !?7,"Duration: ",$E($$GET1^DIQ(55.516,DDR15,"DURATION"),1,37),?50,"Conjunction: ",$E($$GET1^DIQ(55.516,DDR15,"CONJUNCTION"),1,16)
  • Line Location: PRTDDR+25
Function Call: WRITE
  • Prompt: !
  • Line Location: PRTDDR+26
Function Call: WRITE
  • Prompt: @IOF,"Non-VA Meds Usage Report",?70,"Page: ",$J(PAG,3)
  • Line Location: HDR+5
Function Call: WRITE
  • Prompt: !,"Sorted by",$$SRT(PSOSRT)
  • Line Location: HDR+6
Function Call: WRITE
  • Prompt: !,"Date Range: "_$$DT(PSOSD+1\1)_" - "_$$DT(PSOED\1)
  • Line Location: HDR+7
Function Call: WRITE
  • Prompt: ?48,"Run Date: "_$$FMTE^XLFDT($$NOW^XLFDT())
  • Line Location: HDR+8
Function Call: WRITE
  • Prompt: !,X
  • Line Location: HDR+9
Routine Call
  • DIR
  • Line Location:
    • HDR+3

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DPT - [#2] GET1^DIQ
^VA(200 - [#200] GET1^DIQ
^SC - [#44] GET1^DIQ
^PSDRUG - [#50] GET1^DIQ
^PS(50.7 - [#50.7] GET1^DIQ
55.05 GET1^DIQ
55.516 GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^PS(55 - [#55] DATEDFNORDORD+1, ORD+5, ORD+6, ORD+18, PRINT+5, PRINT+8, PRINT+24
, PRINT+28, PRINT+29, PRINT+30, PRINT+36, PRINT+37, PRINT+47, PRINT+49, PRINT+50, PRTDDR+4, PRTDDR+16
^TMP("PSOCNT" EN+3!, END!, PRINT+13*
^TMP("PSONV" EN+3!, ORD+20*, NEXT+3, NEXT+4, NEXT+5, NEXT+6, NEXT+7, NEXT+8, NEXT+9, NEXT+12
NEXT+13, END!

Label References

Name Line Occurrences
$$DT PRINT+17, PRINT+20, PRINT+23, HDR+7
$$SRT HDR+6
CLOSE ORD+8, NEXT+14
DATE DFNDFN+1
DFN DFN+3, ORD
HDR ORD+9, NEXT+10, NDTPNDTP+5, PRINT+6, PRINT+25, PRINT+31, PRINT+34, PRINT+41, PRINT+53
PRTDDR+19, PRTDDR+21, PRTDDR+23, PRTDDR+26
NDTP NEXT+1
NEXT DATE
ORD ORD+2, ORD+3, ORD+4, ORD+5, ORD+6, ORD+8, ORD+21
PRINT ORD+10, NEXT+11
PRTDDR PRINT+16
TEXT PRINT+32, PRINT+38, PRINT+51

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
C EN~
CLNAM PRINT+2~, PRINT+21*, PRINT+22
DATE EN~, EN+7*, DATE*, DFNORDORD+19
DDR PRTDDR+3~, PRTDDR+15*, PRTDDR+16*, PRTDDR+17
DDR05 PRTDDR+3~, PRTDDR+17*, PRTDDR+18
DDR15 PRTDDR+3~, PRTDDR+17*, PRTDDR+19, PRTDDR+20, PRTDDR+21, PRTDDR+25
DDX PRTDDR+3~, PRTDDR+18*
DFN EN~, EN+7*, DFN*, DFN+1*, DFN+3, ORDORD+1, ORD+5, ORD+6, ORD+10
ORD+12, ORD+18, ORD+20, NEXT+2*, NEXT+8*, NEXT+9, NEXT+11, PRINT~, PRINT+5, PRINT+8
, PRINT+13, PRINT+24, PRINT+28, PRINT+29, PRINT+30, PRINT+36, PRINT+37, PRINT+47, PRINT+49, PRINT+50
PRTDDR+4, PRTDDR+16, PRTDDR+17
DGNAM PRINT+2~, PRINT+9*, PRTDDR+7, PRTDDR+18*, PRTDDR+19
DIR HDR+1~
DIR("A" HDR+3*
DIR(0 HDR+3*
DIRUT EN+7!, ORD+8, ORD+9, ORD+10, NEXT+3, NEXT+4, NEXT+5, NEXT+6, NEXT+7, NEXT+8
NEXT+9, NEXT+10, NEXT+12, NEXT+13, NEXT+14, NDTP+5, PRINT+6, PRINT+25, PRINT+29, PRINT+31
, PRINT+33, PRINT+34, PRINT+35, PRINT+40, PRINT+41, PRINT+42, PRINT+44, PRINT+47, PRINT+52, PRINT+53
PRTDDR+19, PRTDDR+21, PRTDDR+23, PRTDDR+26, HDR+2
DT DT~, DT+1, DT+2, DT+3, DT+4
FLD SRT+3~, SRT+6*
I EN~, ORD+16*, ORD+17, ORD+19, PRINT+2~, PRINT+29*, PRINT+30, PRINT+32, PRINT+36, PRINT+37
, PRINT+49*, PRINT+50, SRT+3~, SRT+5*, SRT+6, SRT+7
IO EN+3
IOF HDR+5
IOSL ORD+9, NEXT+10, PRINT+25, PRINT+31, PRINT+34, PRINT+41, PRINT+53, PRTDDR+19, PRTDDR+21, PRTDDR+23
PRTDDR+26
IOST HDR+2
J EN~, PRINT+2~, PRINT+36*, PRINT+37, TEXT+1~, TEXT+2*, TEXT+3
K PRINT+2~, PRINT+33*, PRINT+34, PRINT+40*, PRINT+41, PRINT+52*, PRINT+53, TEXT+1~*, TEXT+3*, TEXT+4
L TEXT~, TEXT+3
OCK EN+1~, ORD+18*, ORD+19, PRINT+3~, PRINT+30*
OCNT EN~, EN+7*, NDTP+4, PRINT+55*
OI PRINT+2~
OINAM EN~, ORD+13*, ORD+14*, ORD+19, PRINT+2~, PRINT+8*, PRINT+15
OIX PRINT+2~
OK EN+1~
ORD EN~, EN+7*, ORD*, ORD+1, ORD+5, ORD+6, ORD+10, ORD+18, ORD+20, NEXT+2*
NEXT+9*, NEXT+11, PRINT~, PRINT+5, PRINT+8, PRINT+24, PRINT+28, PRINT+29, PRINT+30, PRINT+36
, PRINT+37, PRINT+47, PRINT+49, PRINT+50, PRTDDR+4, PRTDDR+16, PRTDDR+17
PAG EN~, PRINT+6, HDR+1*, HDR+2, HDR+5
PCNT EN~, EN+7*, NDTP+3, PRINT+13*
PNAM EN~, ORD+12*, ORD+14*, ORD+19, PRINT+2~, PRINT+10*, PRINT+11
PRTD EN~, EN+7*, NDTPNDTP+1, PRINT+55*
PRV PRINT+2~, PRINT+30*, PRINT+43
>> PSOAOI ORD+2
>> PSOAPT DFNDFN+1
>> PSOED DATEHDR+7
>> PSOOC ORD+5, ORD+6
>> PSOOI( ORD+2
>> PSOPT( DFN+1
>> PSOSD EN+7, HDR+7
>> PSOSRT ORD+8, ORD+12, ORD+13, ORD+16, ORD+17, NEXT+1, HDR+6
>> PSOST ORD+3, ORD+4
PSSN PRINT+2~, PRINT+10*, PRINT+11
REC PRTDDR+3~, PRTDDR+4*, PRTDDR+6
S1 EN~, ORD+15*, ORD+20, NEXT+2*, NEXT+3*, NEXT+4, NEXT+5, NEXT+6, NEXT+7, NEXT+8
NEXT+9, NEXT+12, NEXT+13
S2 EN~, ORD+15*, ORD+20, NEXT+2*, NEXT+4*, NEXT+5, NEXT+6, NEXT+7, NEXT+8, NEXT+9
NEXT+12
S3 EN~, ORD+15*, ORD+20, NEXT+2*, NEXT+5*, NEXT+6, NEXT+7, NEXT+8, NEXT+9
S4 EN~, ORD+15*, ORD+20, NEXT+2*, NEXT+6*, NEXT+7, NEXT+8, NEXT+9
S5 EN~, ORD+15*, ORD+20, NEXT+2*, NEXT+7*, NEXT+8, NEXT+9
SCH PRINT+2~, PRTDDR+10*, PRTDDR+12, PRTDDR+13, PRTDDR+20*, PRTDDR+21, PRTDDR+22, PRTDDR+23
SCHX PRTDDR+3~, PRTDDR+20*, PRTDDR+22, PRTDDR+23
SCHY PRTDDR+3~, PRTDDR+20*
SP1 EN+1~, EN+4*, DATE+1, NEXT+13, NDTP+2
SP2 EN+1~, EN+4*, NEXT+12
SPF EN+1~, EN+4*, DATE+1, ORD+10*
ST SRT~, SRT+5, SRT+6, SRT+7*, SRT+8
STR PRINT+3~, PRINT+30*, PRINT+32, PRINT+37*, PRINT+38, PRINT+50*, PRINT+51, TEXT~, TEXT+2, TEXT+3
, SRT+3~, SRT+4*, SRT+6
STS EN+1~, ORD+17*, ORD+19
SUB EN+1~
TEXT TEXT~
TEXT( TEXT+3, TEXT+4*
TEXT("" TEXT+1
TXT PRINT+2~, PRINT+32!, PRINT+35!, PRINT+38, PRINT+39, PRINT+48!, PRINT+51
TXT( PRINT+33, PRINT+34, PRINT+40, PRINT+41, PRINT+52, PRINT+53
VADM PRINT+2~
VADM(1 PRINT+10
VADM(2 PRINT+10
VAPA PRINT+2~
VAPA(8 PRINT+12
WORD TEXT+1~, TEXT+3*, TEXT+4
X EN~, PRINT+2~, PRTDDR+9*, PRTDDR+10, HDR+1~, HDR+9*, SRT+3~, SRT+6*, SRT+7
XX EN~, ORD+1*, ORD+2, ORD+3, ORD+4, ORD+13, ORD+17, PRINT+2~, PRINT+8*, PRINT+9
, PRINT+17, PRINT+18, PRINT+19, PRINT+20, PRINT+21, PRINT+22, PRINT+23, PRTDDR+8, PRTDDR+9, PRTDDR+10
PRTDDR+11, PRTDDR+12, PRTDDR+13
Y EN~, ORD+17*, ORD+19
Z PRINT+2~
>> ZTQUEUED CLOSE
>> ZTREQ CLOSE*
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