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 |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables |  Marked Items |  All
Print Page as PDF
Routine: AMHRPSU3

Package: Mental Health Social Services

Routine: AMHRPSU3


Information

AMHRPSU3 ; IHS/CMI/LAB - Suicide Form data element tally ;

Source Information

Source file <AMHRPSU3.m>

Call Graph

Call Graph Total: 13

Package Total Call Graph
IHS VA Utilities 5 ^XBDBQUE  $$VAL^XBDIQ1  ^XBFMK  $$EXTSET^XBFUNC  EN^XBVK  
Mental Health Social Services 3 $$ETHN^AMHRPSU1  ($$DV4,DBHUSRP)^AMHUTIL  ($$DEMO,DEMOCHK)^AMHUTIL1  
VA Fileman 2 C^%DTC  ^DIR  
IHS Patient 1 KILL^AUPNPAT  
IHS Patient Registration 1 $$RACE^AGUTL  
Kernel 1 ($$FMADD,$$FMTE)^XLFDT  

Entry Points

Name Comments DBIA/ICR reference
BD ;
DEMO ;
RBLK(V,L) ;EP right blank fill
22 ;;Disposition;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.25)
LABEL ;
USR() ;EP - Return name of current user from ^VA(200.
EOP ;EP - End of page.
DONE ;
PRINT ;EP called from xbdbque
20 ;;Location of Act, if other;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,1401)
21 ;;Lethality;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.24)
LOC() ;EP - Return location name from file 4 based on DUZ(2).
23 ;;Disposition if other;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,1402)
BROWSE ;
CTR(X,Y) ;EP - Center X in a field Y wide.
1 ;;Unique Case ID;;S X=$P(^AMHPSUIC(AMHVDFN,0),U)
V1 ;
3 ;;Event logged by;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.031)
2 ;;Local Case #;;S X=$P(^AMHPSUIC(AMHVDFN,0),U,2)
5 ;;Unique ID of Patient;;S X=$P(^AMHPSUIC(AMHVDFN,0),U,4),X=$$UID^AGTXID(X)
LBLK(V,L) ;left blank fill
7 ;;Age of Patient on date of act;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.043)
EOJ ;
9 ;;Community of Residence;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.045)
8 ;;Tribe of Enrollment;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.044)
4 ;;Discipline of Prov;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.032)
PAUSE ;
ZIS ;
XTMP(N,D) ;EP - set xtmp 0 node
ED ;
6 ;;Sex of Patient;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.041)
START ;
V ; Run by visit date
11 ;;Date of Act;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.06)
10 ;;Employment Status;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.05)
13 ;;Relationship Status;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.08)
12 ;;Community where act occurred;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.07)
15 ;;Education Level;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.11)
14 ;;Relationship if Other;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.09)
17 ;;Suicidal Behavior;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.131)
16 ;;If less than 12;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.12)
19 ;;Location of Act;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.15)
18 ;;Previous Attempts;;S X=$$VAL^XBDIQ1(9002011.65,AMHVDFN,.14)
SELF ;
GETDATES ;
PROC ;EP

External References

Name Field # of Occurrence
C^%DTC ED+5
$$RACE^AGUTL V1+36, V1+37
$$ETHN^AMHRPSU1 V1+38
$$DV4^AMHUTIL V1+13
DBHUSRP^AMHUTIL START+6
$$DEMO^AMHUTIL1 V1+5
DEMOCHK^AMHUTIL1 DEMO+1
KILL^AUPNPAT EOJ+3
^DIR BD+1, ED+1, SELF+12, ZIS+1, PAUSE+1, DONE+1, EOP+5
^XBDBQUE ZIS+5, BROWSE+2
$$VAL^XBDIQ1 V1+39
^XBFMK EOJ+4
$$EXTSET^XBFUNC V1+21, V1+25
EN^XBVK EOJ+1
$$FMADD^XLFDT XTMP+2
$$FMTE^XLFDT PRINT+2, PRINT+4

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"Extract Suicide Form Data Elements in Delimited format"
  • Line Location: START+4
Function Call: WRITE
  • Prompt: !!,"This report will extract all data elements on the Suicide Form in a ",!,"delimited form for a date range specified by the user.",!!
  • Line Location: START+5
Function Call: WRITE
  • Prompt: !,"Ending date must be greater than or equal to beginning date!"
  • Line Location: ED+3
Function Call: WRITE
  • Prompt: !?5,1,?10,"IDEATION WITH PLAN AND INTENT"
  • Line Location: SELF+2
Function Call: WRITE
  • Prompt: !?5,2,?10,"ATTEMPT"
  • Line Location: SELF+3
Function Call: WRITE
  • Prompt: !?5,3,?10,"COMPLETED SUICIDE"
  • Line Location: SELF+4
Function Call: WRITE
  • Prompt: !?5,4,?10,"ATTEMPTED SUICIDE WITH HOMICIDE (INACTIVE)"
  • Line Location: SELF+5
Function Call: WRITE
  • Prompt: !?5,5,?10,"COMPLETED SUICIDE WITH HOMICIDE (INACTIVE)"
  • Line Location: SELF+6
Function Call: WRITE
  • Prompt: !?5,6,?10,"ATTEMPTED SUICIDE WITH ATTEMPTED HOMICIDE"
  • Line Location: SELF+7
Function Call: WRITE
  • Prompt: !?5,7,?10,"ATTEMPTED SUICIDE WITH COMPLETED HOMICIDE"
  • Line Location: SELF+8
Function Call: WRITE
  • Prompt: !?5,8,?10,"COMPLETED SUICIDE WITH ATTEMPTED HOMICIDE"
  • Line Location: SELF+9
Function Call: WRITE
  • Prompt: !?5,9,?10,"COMPLETED SUICIDE WITH COMPLETED HOMICIDE"
  • Line Location: SELF+10
Function Call: WRITE
  • Prompt: !?5,0,?10,"ALL OF THE ABOVE (ALSO INCLUDES BLANKS)"
  • Line Location: SELF+11
Function Call: WRITE
  • Prompt: !!
  • Line Location: ZIS+4
Function Call: WRITE
  • Prompt: !,$$LOC,"^^^",$$FMTE^XLFDT(DT)
  • Line Location: PRINT+2
Function Call: WRITE
  • Prompt: !,X,!
  • Line Location: PRINT+3
Function Call: WRITE
  • Prompt: "Act Occurred","^",$$FMTE^XLFDT(AMHBD),"^",$$FMTE^XLFDT(AMHED),!
  • Line Location: PRINT+4
Function Call: WRITE
  • Prompt: !!,X
  • Line Location: PRINT+17
Routine Call
  • DIR
  • Line Location:
    • BD+1
    • ED+1
    • SELF+12
    • ZIS+1
    • PAUSE+1
    • DONE+1
    • EOP+5

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^AMHPSUIC - [#9002011.65] V1+2, V1+3, V1+4, V1+19, V1+21, V1+22, V1+24, V1+25, V1+27, V1+29
, V1+30, V1+31, V1+33, V1+34, V1+35
^AMHPSUIC("AD" V+1, V1+1
^AMHTSCF - [#9002014.9] V1+33
^AMHTSSU - [#9002014.71] V1+29
^DIC(4 - [#4] LOC+1
^VA(200 - [#200] USR+1
^XTMP( XTMP+2*
^XTMP("AMHRPSU3" PROC+2!, V1+40*, PRINT+18, PRINT+19, DONE+2!

Label References

Name Line Occurrences
$$LOC PRINT+2
BROWSE ZIS+3
ED ED+3
EOJ START+2, BD+2, ED+2, ZIS+2, ZIS+3, ZIS+6
SELF DEMO+2
V1 V+1
XTMP PROC+3

Naked Globals

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

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
% LBLK+1~, LBLK+2*, RBLK+1~, RBLK+2*
A EOJ+2!
>> AMHANS SELF+13*, SELF+14, V1+2
>> AMHBD BD+3*, ED+3, ED+5, V1+13, PRINT+4
>> AMHC SELF+13*, V1+19*, V1+20*, V1+21, V1+24*, V1+25, V1+27*, V1+28*, V1+29, V1+31*
, V1+32*, V1+33
>> AMHDEMO DEMO+1, DEMO+2, V1+5
>> AMHDFNP V1+35*, V1+36, V1+37, V1+38, V1+39
>> AMHED ED+4*, V+1, PRINT+4
>> AMHH PROC+1*, PROC+2, V1+40, PRINT+18, PRINT+19, DONE+2
>> AMHI SELF+13*
>> AMHJ PROC+1*, PROC+2, V1+40, PRINT+18, PRINT+19, DONE+2
>> AMHP V1+9*, V1+11, V1+14*, V1+16
>> AMHQUIT PAUSE+2*
>> AMHREC V1+7*, V1+11*, V1+16*, V1+21*, V1+22*, V1+25*, V1+29*, V1+30*, V1+33*, V1+34*
, V1+36*, V1+37*, V1+38*, V1+39*, V1+40
>> AMHSD ED+5*, V+1*, V1+1
AMHSELF SELF+1!
AMHSELF( SELF+13*, SELF+14*, V1+3
>> AMHT V1+8*, V1+9, V1+13*, V1+14, PRINT+5*
>> AMHV V1+9*, V1+10, V1+14*, V1+15
>> AMHVDFN V1+1*, V1+2, V1+3, V1+4, V1+19, V1+21, V1+22, V1+24, V1+25, V1+27
, V1+29, V1+30, V1+31, V1+33, V1+34, V1+35, V1+40, PRINT+18*, PRINT+19
>> AMHX V1+8*, V1+13*, V1+19*, V1+21, V1+22, V1+24*, V1+27*, V1+29, V1+30, V1+31*
, V1+33, V1+34, PRINT+5*, PRINT+6*, PRINT+8*, PRINT+9*, PRINT+11*
B EOJ+2!
D XTMP~, XTMP+2
DA ED+1!, SELF+12!, ZIS+1!, PAUSE+1!
DFOUT EOP+4!
DIR BD+1!, ED+1!, SELF+12!, ZIS+1!, PAUSE+1!, DONE+1!, EOP+3~
DIR("?" BD+1*
DIR("A" BD+1*, ED+1*, SELF+12*, ZIS+1*, PAUSE+1*, DONE+1*
DIR("B" SELF+12*, ZIS+1*
DIR(0 BD+1*, ED+1*, SELF+12*, ZIS+1*, PAUSE+1*, DONE+1*, EOP+5*
DIRUT BD+1*, BD+2, ED+1*, ED+2, ZIS+2, PAUSE+2, DONE+1*, EOP+4!
DLOUT EOP+4!
DT PRINT+2, XTMP+2
DTOUT EOP+4!
DUOUT BD+1, ED+1, DONE+1, EOP+4!
DUZ USR+1
DUZ(2 LOC+1
I LBLK+1~, LBLK+2*, RBLK+1~, RBLK+2*
IO DONE+1
IO("S" EOP+2
IO(0 DONE+1
IOF START+1, START+3, PAUSE+3, PRINT+1
IOM CTR+1
IOST DONE+1, EOP+1
>> IOT EOP+2
L EOJ+2!, LBLK~, LBLK+2, RBLK~, RBLK+2
M EOJ+2!
N XTMP~, XTMP+1, XTMP+2
>> P V1+4*, V1+5
S EOJ+2!
T EOJ+2!
U V1+2, V1+3, V1+4, V1+11, V1+16, V1+21, V1+22, V1+24, V1+25, V1+29
, V1+30, V1+33, V1+34, V1+35, V1+36, V1+37, V1+38, V1+39, PRINT+5, PRINT+6
, PRINT+7, PRINT+8, PRINT+9, PRINT+10, PRINT+11, PRINT+12, PRINT+13, PRINT+14, PRINT+15, PRINT+16
, USR+1, LOC+1
V LBLK~, LBLK+2*, LBLK+3, RBLK~, RBLK+2*, RBLK+3
X ED+5, SELF+14*, EOJ+2!, V1+11, V1+16, PRINT+3*, PRINT+5*, PRINT+6*, PRINT+7*, PRINT+8*
, PRINT+9*, PRINT+10*, PRINT+11*, PRINT+12*, PRINT+13*, PRINT+14*, PRINT+15*, PRINT+16*, PRINT+17, CTR~
, CTR+1
X1 ED+5*, EOJ+2!
X2 ED+5*, EOJ+2!
>> XBIOP BROWSE+2*
>> XBNS ZIS+4*, BROWSE+2*
>> XBRC ZIS+4*, BROWSE+2*
>> XBRP ZIS+4*, BROWSE+1*
>> XBRX ZIS+4*, BROWSE+2*
Y BD+3, ED+3, ED+4, SELF+13, ZIS+3, EOJ+2!, V1+21*, V1+25*, V1+29*, V1+33*
, CTR~, CTR+1
Z EOJ+2!, LBLK+2*, RBLK+2*
>> ZTQUEUED EOP+2

Marked Items

Name Field # of Occurrence
$T(@AMHX V1+8, V1+13, PRINT+5
Info |  Source |  Call Graph |  Entry Points |  External References |  Interaction Calls |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables |  Marked Items |  All