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 |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables |  Marked Items |  All
Print Page as PDF
Routine: AMHEYREX

Package: Mental Health Social Services

Routine: AMHEYREX


Information

AMHEYREX ; IHS/CMI/LAB - CMI ;

Source Information

Source file <AMHEYREX.m>

Call Graph

Call Graph Total: 15

Package Total Call Graph
VA Fileman 5 C^%DTC  ^DIC  ^DIE  (,IX1)^DIK  ^DIR  
IHS VA Utilities 3 ^XBFMK  ^XBGSAVE  EN^XBVK  
Kernel 3 HOME^%ZIS  ^%ZTLOAD  $$FMTE^XLFDT  
Mental Health Social Services 3 RECORD^AMHEYD2  CALLDIE^AMHLEIN  $$DATE^AMHUTIL  
IHS Patient 1 KILL^AUPNPAT  

Entry Points

Name Comments DBIA/ICR reference
BD ;
RESET ; PURGE 'AEX' XREF FOR MHSS RECORDS JUST DONE
CONT ;continue or not
GENLOG ;generate new log entry
NLOG() ;get next log
QUEUE ;EP
USR() ;EP - Return name of current user from ^VA(200.
EOP ;EP - End of page.
RESETSF ; kill MHSS xref and set flag if tx 23 or 24 generated
LOC() ;EP - Return location name from file 4 based on DUZ(2).
CTR(X,Y) ;EP - Center X in a field Y wide.
V1 ;go through each visit on this date
INTRO ;introductory text
DATE(D) ;EP ;IHS/CMI/LAB - new date format - format date in YYYYMMDD format
PURGESF ; PURGE 'AEX' XREF FOR MHSS RECORDS JUST DONE
CHKSITE ; CHECK SITE FILE
QUEUE1 ;
ED ;
CNTBUILD ;count and build tx
START ;Begin processing backload
ERRLOG ;
XIT ;exit, eoj cleanup
V ; Run by visit date
PROCESS ;EP - process new run
GENREC ;generate record
GETDATES ;
RESET1 ; kill MHSS xref and set flag if tx 23 or 24 generated
PROC ;
SF ;
WRITEF ;EP - write out flat file

External References

Name Field # of Occurrence
C^%DTC ED+5
HOME^%ZIS CONT+5
^%ZTLOAD QUEUE1+3
RECORD^AMHEYD2 GENREC+7
CALLDIE^AMHLEIN RESET1+1, RESETSF+1
$$DATE^AMHUTIL WRITEF+7, WRITEF+8, WRITEF+9
KILL^AUPNPAT GENREC+2, XIT+4
^DIC GENLOG+3
^DIE SF+20, QUEUE1+7, WRITEF+21
^DIK QUEUE+4, QUEUE1+5
IX1^DIK SF+23
^DIR BD+1, ED+1, CONT+1, QUEUE+2, EOP+5
^XBFMK GENREC+9, XIT+2
^XBGSAVE WRITEF+17
EN^XBVK XIT+3
$$FMTE^XLFDT ED+7

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !,$$CTR($$LOC(),80),!
  • Line Location: START+2
Function Call: WRITE
  • Prompt: !,$$CTR(X,80),!
  • Line Location: START+3
Function Call: WRITE
  • Prompt: !,"ATTENTION: This option should ONLY be run if you have had",!,"a special request from IHS to re-send a large amount of previously",!,"exported data."
  • Line Location: START+4
Function Call: WRITE
  • Prompt: !,"You should use the GEN and REDO options for all regularly scheduled exports.",!!
  • Line Location: START+5
Function Call: WRITE
  • Prompt: !,X
  • Line Location: START+6
Function Call: WRITE
  • Prompt: !!,"*** Site file has not been setup! ***"
  • Line Location: CHKSITE+1
Function Call: WRITE
  • Prompt: !!,"*** RUN LOCATION not in SITE file!"
  • Line Location: CHKSITE+2
Function Call: WRITE
  • Prompt: !!,"xtmp nodes around from previous run......"
  • Line Location: CHKSITE+3
Function Call: WRITE
  • Prompt: !,"A file will be created and will be placed in the public directory where",!,"all other exports are placed. It will be called AMHX"_$P(^AUTTLOC(DUZ(2),0),U,10)_"."_$$NLOG,!
  • Line Location: CHKSITE+4
Function Call: WRITE
  • Prompt: !!,$C(7),$C(7),"BHSXDATA GLOBAL EXISTS FROM A PREVIOUS RUN - CANNOT CONTINUE"
  • Line Location: CHKSITE+5
Function Call: WRITE
  • Prompt: !,"Please enter the date range for which the records should be generated.",!
  • Line Location: GETDATES+1
Function Call: WRITE
  • Prompt: !,"Ending date must be greater than or equal to beginning date!"
  • Line Location: ED+3
Function Call: WRITE
  • Prompt: !!,"Log entry ",$$NLOG," will be created and records generated for visit",!,"date range ",$$FMTE^XLFDT(AMHBD)," to ",$$FMTE^XLFDT(AMHED),".",!
  • Line Location: ED+7
Function Call: WRITE
  • Prompt: !!,"Goodbye"
  • Line Location: CONT+2
Function Call: WRITE
  • Prompt: !!,"Goodbye"
  • Line Location: CONT+3
Function Call: WRITE
  • Prompt: !!,"Goodbye, no processing will occur.",!
  • Line Location: CONT+9
Function Call: WRITE
  • Prompt: !,"Okay, you '^'ed out or timed out so I'm deleting the Log entry and quitting.",!
  • Line Location: QUEUE+4
Function Call: WRITE
  • Prompt: !!,$S($D(ZTSK):"Request Queued!!",1:"Request cancelled")
  • Line Location: QUEUE1+4
Function Call: WRITE
  • Prompt: !,"Okay, you '^'ed out or timed out so I'm deleting the Log entry and quitting.",!
  • Line Location: QUEUE1+5
Function Call: WRITE
  • Prompt: !!,$C(7),$C(7),"Error creating log entry."
  • Line Location: GENLOG+4
Routine Call
  • %ZIS
  • Line Location:
    • CONT+5
Routine Call
  • DIE
  • Line Location:
    • SF+20
    • QUEUE1+7
    • WRITEF+21
Routine Call
  • DIC
  • Line Location:
    • GENLOG+3
Routine Call
  • DIR
  • Line Location:
    • BD+1
    • ED+1
    • CONT+1
    • QUEUE+2
    • EOP+5

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^AMHREC - [#9002011] Classic Fileman Calls
^AMHEXRL - [#9002011.6] Classic Fileman Calls
^AMHPSUIC - [#9002011.65] Classic Fileman Calls

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^AMHERR - [#9002014.3] ERRLOG+2
^AMHERR("B" ERRLOG+1
^AMHEXRL - [#9002011.6] SF+21*, SF+22*, WRITEF+8, WRITEF+9, WRITEF+11, WRITEF+12, WRITEF+13, NLOG+1
^AMHPSUIC - [#9002011.65] SF+6, SF+7
^AMHPSUIC("AD" SF+4, SF+5, SF+6!
^AMHREC - [#9002011] V1+1, GENREC+4
^AMHREC("B" V+1, V1+1
^AMHRECD - [#9002014.1] SF+11, SF+13, SF+14, SF+15
^AMHRECD("B" SF+9
^AMHSITE - [#9002013] CHKSITE+1, CHKSITE+2
^AUTTLOC - [#9999999.06] CHKSITE+4, WRITEF+5, WRITEF+15, WRITEF+21
^AUTTSITE(1 WRITEF+4, WRITEF+5, WRITEF+6
^BHSXDATA CHKSITE+5, PROCESS+3!, WRITEF+1, WRITEF+20!, SF+19*, CNTBUILD+4*
^BHSXDATA(0 WRITEF+14*
^DIC(4 - [#4] WRITEF+6, LOC+1
^VA(200 - [#200] WRITEF+15, USR+1
^XTMP("AMHEXRL" CHKSITE+3, SF+18*, CNTBUILD+2*, RESET+3, RESET+5!, PURGESF+2

Label References

Name Line Occurrences
$$CTR START+2, START+3
$$LOC START+2
$$NLOG CHKSITE+4, ED+7, GENLOG+2
CNTBUILD GENREC+8
ED ED+3
EOP XIT+1
ERRLOG CNTBUILD+1
GENLOG CONT+6
PROC V1+1
PURGESF RESET+4
QUEUE CONT+8
QUEUE1 QUEUE+3
RESET SF+25
RESET1 RESET+3
RESETSF PURGESF+2
V1 V+1
WRITEF SF+24
XIT CHKSITE+3, CHKSITE+5, BD+2, ED+2, CONT+2, CONT+3, CONT+7, CONT+9, CONT+10, SF+26

Naked Globals

Name Field # of Occurrence
^(0 V1+1, USR+1, LOC+1

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
>> AMH("CONTROL DATE" , SF+2*
>> AMH("COUNT" PROCESS+6*, SF+17*, SF+19, SF+20, CNTBUILD+3*, CNTBUILD+4
>> AMH("ENC" PROCESS+6*, SF+20
>> AMH("ERROR CO UNT" , PROCESS+6*, SF+20, CNTBUILD+1*
>> AMH("QFLG" CHKSITE+1*, CHKSITE+2*
>> AMHBD BD+3*, ED+3, ED+5, ED+7, GENLOG+2
>> AMHBS CONT+5*
>> AMHCNT PROCESS+1*, GENREC+3, RESET1+2, RESETSF+2
>> AMHCNT1 PROCESS+1*
>> AMHCNT2 PROCESS+1*
>> AMHCNTR SF+2*, RESET+2*, PURGESF+1*
AMHE GENREC+1!, GENREC+7!, CNTBUILD+1, ERRLOG+1
>> AMHED ED+4*, ED+7, V+1, SF+4, GENLOG+2
>> AMHERR ED+6*, CONT+4*, CONT+7, CONT+9, QUEUE+4*, QUEUE+5*, QUEUE1+5*, WRITEF+19*, GENLOG+4*
AMHERRT PROCESS+6!
AMHERRT( SF+22, ERRLOG+3*
AMHERRT("UNKN OWN ERROR" , ERRLOG+1*, ERRLOG+2*
>> AMHERRTX ERRLOG+1*, ERRLOG+2*, ERRLOG+3
>> AMHLOG SF+20, SF+21, SF+22, SF+23, QUEUE+4, QUEUE1+5, QUEUE1+7, WRITEF+8, WRITEF+9, WRITEF+11
, WRITEF+12, WRITEF+13, WRITEF+15, WRITEF+21, GENLOG+5*
>> AMHQUE CONT+10, QUEUE1+6*
>> AMHR V1+1*, GENREC+4, CNTBUILD+2, RESET+2*, RESET+3*, RESET1+1, PURGESF+1*, PURGESF+2*, RESETSF+1
>> AMHREC GENREC+4*, GENREC+5
>> AMHRIEN SF+9*, SF+10, SF+11, SF+13, SF+14, SF+15
>> AMHRUN CONT+4*, QUEUE+4, QUEUE+5, QUEUE1+5
>> AMHSD ED+5*, PROCESS+4*, V+1*, SF+3*, SF+4*, SF+5, SF+6, V1+1
>> AMHSFC SF+2*, SF+17*, SF+20
>> AMHSFIEN SF+5*, SF+6, SF+7, SF+18
>> AMHSREC SF+7*, SF+8
AMHT GENREC+1!
>> AMHTERR PROCESS+6*
>> AMHTOTR PROCESS+6*, SF+20, GENREC+6*
>> AMHTOTV PROCESS+6*
AMHTX SF+11*, SF+16*, SF+19, GENREC+7!, CNTBUILD+4, WRITEF+3*, WRITEF+4*, WRITEF+5*, WRITEF+6*, WRITEF+7*
, WRITEF+8*, WRITEF+9*, WRITEF+10*, WRITEF+11*, WRITEF+12*, WRITEF+13*, WRITEF+14
>> AMHUSED PROCESS+6*
AMHV GENREC+1!
AMHV("R DATE" , GENREC+5*
>> AMHVREC V1+1*
>> AMHY SF+11*, SF+13, SF+16
>> AMHZ SF+13*, SF+14, SF+15
>> C SF+22*
D DATE~, DATE+1, DATE+2
DA ED+1!, CONT+1!, SF+20*!, SF+23*!, QUEUE+4*!, QUEUE1+5*!, QUEUE1+7*!, WRITEF+21*!, RESET1+1*, RESETSF+1*
>> DFN SF+8*
DFOUT EOP+4!
DIC GENLOG+2*, GENLOG+3!
DIC("DR" GENLOG+2*
DIC(0 GENLOG+2*
DIE SF+20*!, QUEUE1+7*!, WRITEF+21*!, RESET1+1*, RESETSF+1*
DIK SF+23*!, QUEUE+4*!, QUEUE1+5*!
DIR BD+1!, ED+1!, CONT+1!, QUEUE+2!, EOP+3~
DIR("?" BD+1*
DIR("A" BD+1*, ED+1*, CONT+1*, QUEUE+2*, EOP+5*
DIR("B" CONT+1*, QUEUE+2*
DIR(0 BD+1*, ED+1*, CONT+1*, QUEUE+2*, EOP+5*
DIRUT BD+1*, BD+2, ED+1*, ED+2, CONT+2, QUEUE+2*, QUEUE+4, QUEUE+5, EOP+4!
DLAYGO GENLOG+2*, GENLOG+3!
DLOUT EOP+4!
DR SF+20*!, QUEUE1+7*!, WRITEF+21*!, GENLOG+3!, RESET1+1*, RESETSF+1*
DT WRITEF+7, GENLOG+2, RESET1+1, RESETSF+1
DTOUT EOP+4!
DUOUT BD+1, ED+1, QUEUE+2, EOP+4!
DUZ WRITEF+15, USR+1
DUZ(2 CHKSITE+1, CHKSITE+2, CHKSITE+4, WRITEF+15, WRITEF+21, GENLOG+2, LOC+1
IO("S" EOP+2
>> IOBS CONT+5
IOF START+1
IOM CTR+1
IOST EOP+1
>> IOT EOP+2
J START+6*, START+7!
L NLOG+1~*, NLOG+2
T START+6*, START+7!
U CHKSITE+4, SF+8, SF+16, WRITEF+4, WRITEF+5, WRITEF+6, WRITEF+7, WRITEF+8, WRITEF+9, WRITEF+10
, WRITEF+11, WRITEF+12, WRITEF+13, WRITEF+15, WRITEF+21, USR+1, LOC+1, ERRLOG+2
X START+3*, START+6*, START+7!, ED+5, SF+12*, SF+16, SF+22*, GENLOG+2*, CTR~, CTR+1
, NLOG+1~*
>> X1 ED+5*
>> X2 ED+5*
XBF WRITEF+16*, WRITEF+22!
>> XBFLG WRITEF+19
>> XBFLG(1 WRITEF+19
XBFLT WRITEF+22!
XBFN WRITEF+15*, WRITEF+22!
XBGL WRITEF+2*, WRITEF+22!
XBMED WRITEF+15*, WRITEF+22!
XBQ WRITEF+16*, WRITEF+22!
XBTLE WRITEF+15*, WRITEF+22!
Y BD+3, ED+3, ED+4, CONT+3, QUEUE+3, GENLOG+2*, GENLOG+4, GENLOG+5, CTR~, CTR+1
>> ZTDESC QUEUE1+2*
>> ZTDTH QUEUE1+2*
>> ZTIO QUEUE1+2*
>> ZTQUEUED CONT+5, PROCESS+1, PROCESS+2, SF+1, WRITEF+1, WRITEF+19, GENLOG+1, EOP+2, RESET+1
>> ZTRTN QUEUE1+1*
>> ZTSAVE("AMH*" QUEUE1+2*
ZTSK QUEUE+1!, QUEUE1+4, QUEUE1+5, QUEUE1+8!

Marked Items

Name Field # of Occurrence
$T(@T+J START+6
Info |  Source |  Call Graph |  Entry Points |  External References |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables |  Marked Items |  All