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 |  Global Variables Directly Accessed |  Label References |  Local Variables  | All
Print Page as PDF
Routine: MAGDSTQA

Package: Imaging

Routine: MAGDSTQA


Information

MAGDSTQA ;WOIFO/PMK - Study Tracker - Query/Retrieve user patient lookup ; Aug 30, 2020@17:57:08

Source Information

Source file <MAGDSTQA.m>

Call Graph

Call Graph

Call Graph Total: 10

Package Total Call Graph
Imaging 8 VADPT^MAGDRPC0  PAT^MAGDRPC1  (HISTLKUP,PATLKUP,SCREEN)^MAGDSTA3  RADLKUP^MAGDSTA4  CONLKUP^MAGDSTA6  ($$VISTA,$$YESNO,CONTINUE)^MAGDSTQ  ERRORMSG^MAGDSTQ0  $$CALLRPC^MAGM2VCU  
Kernel 1 $$FMTE^XLFDT  
Registration 1 (NOTICE,PTSEC)^DGSEC4  

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

Package Total Caller Graph
Imaging 2 MAGDSTA3  MAGDSTQ7  

Entry Points

Name Comments DBIA/ICR reference
PATIENTA ; need just DFN for current patient, no previous PII
PATIENT(PATINFO,DFN) ; look up the patients
PATIENT1(PATINFO) ; lookup patient
PATIENT2(LISTMODE,INFO,DEFAULT) ; called to display a list of patients or a list of PII changes
; INFO can be either PATINFO or HISTINFO, same format
SINGLE(LISTMODE,INFO,I) ; single match
SINGLEA() ; automatic (batch) query retrieve
; check for radiology or consults
SINGLEQ() ; manual query retrieve
PATCHECK(DFN) ; check patient sensitivity
MULTIPLE(LISTMODE,INFO,DEFAULT) ; display information for multiple patients/pii changes
MULTI(DEFAULT) ; display one set of patients
PRINTHDR ; print column header
PRINTPAT(INFO,I,SENSITIVEOK) ; print patient information
SAVEINFO(INFO,DFN,NAME,DOB,PID,SEX,DOD,SENSITIVE,CHANGED,CHANGEDATE) ; save pii
; DFN^patient name^DOB^PID^SEX^DOD^Sensitive^Changed Field^Change date & time
; 1 2 3 4 5 6 7 8 9
GETINFO(INFO,I) ; retrieve pii
CHANGEDT(X) ; return change date in mm/dd/yy format
PATLKUP(OUTPUT,INPUT) ; patient lookup
; INPUT = value to lookup
; Lookup uses multiple index lookup of File #2
;
; OUTPUT = data
; OUTPUT(0) = number of records
; for i=1:number of records returned:
; DFN^patient name^DOB^PID^SEX^DOD^Sensitive
; 1 2 3 4 5 6 7
;
; (DOD = Date of Death)
;
SCREEN(SCREEN,DFN) ; Screening logic sensitive patients
; Input : DFN - Pointer to PATIENT file (#2)
; Output : 0 - Don't apply screen
; 1 - Apply screen - sensitive patient
; 2 - Apply screen - employee
; Notes : Screen applied if patient is sensitive or an employee
HISTLKUP(OUTPUT,DFN) ; look up historical patient changes in the audit archive
; INPUT = value to lookup
; Lookup uses multiple index lookup of File #2
;
; OUTPUT = data
; OUTPUT(0) = number of records
; for i=1:number of records returned:
; DFN^Patient Name^DOB^PID^SEX^DOD^Sensitive^Changed Field^Change date & time
; 1 2 3 4 5 6 7 8 9
;
; (DOD = Date of Death; DOD and Sensitive are null)

External References

Name Field # of Occurrence
NOTICE^DGSEC4 PATCHECK+24
PTSEC^DGSEC4 PATCHECK+5
VADPT^MAGDRPC0 PATIENT+15
PAT^MAGDRPC1 PATIENT+6
HISTLKUP^MAGDSTA3 HISTLKUP+13
PATLKUP^MAGDSTA3 PATLKUP+13
SCREEN^MAGDSTA3 SCREEN+8
RADLKUP^MAGDSTA4 SINGLEA+3
CONLKUP^MAGDSTA6 SINGLEA+6
$$VISTA^MAGDSTQ PATIENT+5, PATCHECK+4, PATCHECK+23, PATLKUP+12, SCREEN+7, HISTLKUP+12
$$YESNO^MAGDSTQ PATIENT+24, SINGLEA+11, SINGLEQ+1, PATCHECK+21
CONTINUE^MAGDSTQ PATCHECK+19, PATCHECK+20
ERRORMSG^MAGDSTQ0 PATIENT+11, PATCHECK+10, PATCHECK+29, PATLKUP+20, SCREEN+14, HISTLKUP+20
$$CALLRPC^MAGM2VCU PATIENT+9, PATCHECK+8, PATCHECK+27, PATLKUP+18, SCREEN+12, HISTLKUP+18
$$FMTE^XLFDT CHANGEDT+1

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"The patient is currently defined as follows: "
  • Line Location: PATIENT+4
Function Call: WRITE
  • Prompt: !!
  • Line Location: PATIENT+22
Function Call: WRITE
  • Prompt: !!,"Enter Patient: "
  • Line Location: PATIENT1+3
Function Call: READ
  • Variable: X
  • Timeout: DTIME
  • Line Location: PATIENT1+4
Function Call: WRITE
  • Prompt: !!,"Enter either the Patient Name (last,first), the Social Security Number,"
  • Line Location: PATIENT1+14
Function Call: WRITE
  • Prompt: !,"or the Quick PID (initial + last four). You may use ""@"" to remove it."
  • Line Location: PATIENT1+15
Function Call: WRITE
  • Prompt: " -- NO MATCH"
  • Line Location: PATIENT2+5
Function Call: WRITE
  • Prompt: " -- ",COUNT," MATCH"
  • Line Location: PATIENT2+6
Function Call: WRITE
  • Prompt: "ES"
  • Condition for execution: COUNT>1
  • Line Location: PATIENT2+6
Function Call: WRITE
  • Prompt: !!
  • Line Location: SINGLE+3
Function Call: WRITE
  • Prompt: !!
  • Line Location: SINGLE+7
Function Call: WRITE
  • Prompt: ?65,"*SENSITIVE*"
  • Line Location: SINGLE+9
Function Call: WRITE
  • Prompt: !
  • Line Location: PATCHECK+15
Function Call: WRITE
  • Prompt: !?(IOM-$L(SECINFO(I))/2),SECINFO(I)
  • Line Location: PATCHECK+17
Function Call: WRITE
  • Prompt: !!,"There are ",COUNT," matches"
  • Line Location: MULTIPLE+3
Function Call: WRITE
  • Prompt: !!,"There are changes in the patient identification"
  • Line Location: MULTIPLE+4
Function Call: WRITE
  • Prompt: @IOF
  • Line Location: MULTI+5
Function Call: WRITE
  • Prompt: !!,"Enter 1-",K20," to select the ",PROMPT
  • Line Location: MULTI+8
Function Call: WRITE
  • Prompt: ", or <Enter> to see more ",PROMPT,"s"
  • Line Location: MULTI+9
Function Call: WRITE
  • Prompt: DEFAULT,"// "
  • Line Location: MULTI+10
Function Call: READ
  • Variable: I
  • Timeout: $G(DTIME,300)
  • Line Location: MULTI+11
Function Call: WRITE
  • Prompt: DEFAULT
  • Line Location: MULTI+12
Function Call: WRITE
  • Prompt: " ???"
  • Line Location: MULTI+16
Function Call: WRITE
  • Prompt: ?4,"Social Sec#",?16,"Sex",?21,"Patient's Name",?53,"Birth Date"
  • Line Location: PRINTHDR+1
Function Call: WRITE
  • Prompt: ?65,"Change Date"
  • Line Location: PRINTHDR+2
Function Call: WRITE
  • Prompt: !?4,"-----------",?16,"---",?21,"--------------",?53,"----------"
  • Line Location: PRINTHDR+3
Function Call: WRITE
  • Prompt: ?65,"---------------"
  • Line Location: PRINTHDR+4
Function Call: WRITE
  • Prompt: !,$J(I,2),")",?4,"*SENSITIVE*",?17,$E(SEX,1),?21,$E(NAME,1,30),?53,"*SENSITIVE*"
  • Line Location: PRINTPAT+5
Function Call: WRITE
  • Prompt: !,$J(I,2),")",?4,SSN,?17,$E(SEX,1),?21,$E(NAME,1,30),?53,DOB
  • Line Location: PRINTPAT+8
Function Call: WRITE
  • Prompt: ?65,CHANGED,?70,"- ",$$CHANGEDT(CHANGEDATE)
  • Line Location: PRINTPAT+12
Function Call: WRITE
  • Prompt: ?72,$$CHANGEDT(CHANGEDATE)
  • Line Location: PRINTPAT+14

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^TMP("MAG" PATIENTA+6, PATIENT1+8!, PATIENT1+10!, SINGLEA+13*, SINGLEA+14*, SINGLEA+15*

Label References

Name Line Occurrences
$$CHANGEDT PRINTPAT+12, PRINTPAT+14
$$MULTI MULTIPLE+7, MULTIPLE+10
$$MULTIPLE PATIENT2+12
$$PATCHECK SINGLE+6
$$PATIENT PATIENTA+8
$$PATIENT1 PATIENT+26, PATIENT+32
$$PATIENT2 PATIENT1+19
$$SINGLE PATIENT2+9, MULTI+15
$$SINGLEA SINGLE+12
$$SINGLEQ SINGLE+15
GETINFO PRINTPAT+2
PATLKUP PATIENT1+18
PRINTHDR PATIENT+22, SINGLE+3, SINGLE+7, MULTI+5
PRINTPAT PATIENT+23, SINGLE+4, SINGLE+8, MULTI+7
SAVEINFO PATIENT+21
SCREEN PATIENT+17

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
ARRAY PATLKUP+16~, PATLKUP+18, PATLKUP+20, HISTLKUP+16~, HISTLKUP+18, HISTLKUP+20
ARRAY( PATLKUP+23, HISTLKUP+23
ARRAY(1 PATLKUP+22, HISTLKUP+22
CHANGED PATIENTA+2~, PRINTPAT+11, PRINTPAT+12, SAVEINFO~, SAVEINFO+6, GETINFO+3*
CHANGEDATE PATIENTA+2~, PRINTPAT+12, PRINTPAT+14, SAVEINFO~, SAVEINFO+6, GETINFO+3*
CLIENT PATIENTA+1~*, SINGLE+11
COUNT PATIENT2+2~, PATIENT2+3*, PATIENT2+4, PATIENT2+5, PATIENT2+6, PATIENT2+8, MULTIPLE+3, MULTIPLE+6, MULTIPLE+7, MULTI+3
, MULTI+9, PATLKUP+16~, PATLKUP+22*, PATLKUP+23, HISTLKUP+16~, HISTLKUP+22*, HISTLKUP+23
DATETIME SINGLE+1~
DEFAULT PATIENT2~, PATIENT2+3*, PATIENT2+12, MULTIPLE~, MULTIPLE+7, MULTIPLE+10, MULTI~, MULTI+10, MULTI+12
DFN PATIENTA+2~, PATIENTA+6*, PATIENTA+8, PATIENT~, PATIENT+2*, PATIENT+3, PATIENT+6, PATIENT+9, PATIENT+17, PATIENT+21
, PATIENT1+11*, SINGLE+2*, SINGLE+6, SINGLEA+3, SINGLEA+6, PATCHECK~, PATCHECK+2, PATCHECK+5, PATCHECK+8, PATCHECK+24
, PATCHECK+27, PATCHECK+35, SAVEINFO~, SAVEINFO+5, GETINFO+1*, SCREEN~, SCREEN+8, SCREEN+12, HISTLKUP~, HISTLKUP+13
, HISTLKUP+18
DOB PATIENTA+2~, PATIENT+1~, PATIENT+18*, PATIENT+21, PRINTPAT+8, SAVEINFO~, SAVEINFO+4*, SAVEINFO+5, GETINFO+1*
DOD PATIENTA+2~, SAVEINFO~, SAVEINFO+5, GETINFO+2*
DONE PATIENT+1~, SINGLEA+16*, SINGLEQ+3*, MULTIPLE+1~, MULTIPLE+2*, MULTIPLE+7, MULTIPLE+10, MULTI+14*
DTIME PATIENT1+4, MULTIPLE+5, MULTI+11, MULTI+16
FINIS PATIENTA+2~, SINGLEA+16*, SINGLEQ+3*, MULTI+1~, MULTI+4*, MULTI+13*, MULTI+14*
FIRSTDAY SINGLE+1~, SINGLEA+3, SINGLEA+6, SINGLEA+14
FIRSTIEN SINGLE+1~, SINGLEA+3, SINGLEA+6
I PATIENT+1~, PATIENT1+1~, PATIENT1+7*, PATIENT1+8, SINGLE~, SINGLE+2, SINGLE+4, SINGLE+8, SINGLEA+12, SINGLEA+13
, SINGLEQ+2, PATCHECK+14~, PATCHECK+15*, PATCHECK+17, MULTI+1~, MULTI+6*, MULTI+7, MULTI+11*, MULTI+12*, MULTI+13
, MULTI+14*, MULTI+15, PRINTPAT~, PRINTPAT+2, PRINTPAT+5, PRINTPAT+8, GETINFO~, GETINFO+1, PATLKUP+16~, PATLKUP+23*
, HISTLKUP+16~, HISTLKUP+23*
>> IMAGINGSERVICE SINGLEA+2
IN PATIENT1+1~
INFO PATIENT2~, PATIENT2+9, PATIENT2+12, SINGLE~, SINGLE+4, SINGLE+8, MULTIPLE~, MULTI+7, MULTI+15, PRINTPAT~
, PRINTPAT+2, SAVEINFO~, GETINFO~
INFO( SINGLE+2, SINGLEA+13, SAVEINFO+8*, GETINFO+1
INFO(0 PATIENT2+3, SAVEINFO+7*, SAVEINFO+8
INPUT PATLKUP~, PATLKUP+13, PATLKUP+18
IOF MULTI+5
IOM PATCHECK+17
IPATINFO PATIENTA+2~, PATIENTA+8*
K PATIENTA+2~, MULTIPLE+7*, MULTIPLE+10*, MULTI+3, MULTI+6
K20 MULTI+1~, MULTI+3*, MULTI+6, MULTI+8, MULTI+9, MULTI+15
LASTDAY SINGLE+1~, SINGLEA+3, SINGLEA+6, SINGLEA+15
LASTIEN SINGLE+1~, SINGLEA+3, SINGLEA+6
LISTMODE PATIENT2~, PATIENT2+4, PATIENT2+9, PATIENT2+12, SINGLE~, MULTIPLE~, MULTIPLE+3, MULTI+15, PRINTHDR+2, PRINTHDR+4
, PRINTPAT+10
NAME PATIENT+1~, PATIENT+18*, PATIENT+21, PRINTPAT+5, PRINTPAT+8, SAVEINFO~, SAVEINFO+5, GETINFO+1*
NOTICE PATCHECK+1~, PATCHECK+24, PATCHECK+27, PATCHECK+28, PATCHECK+29
OK PATIENT1+1~, PATIENT1+2*, PATIENT1+5*, PATIENT1+11*, PATIENT1+21, SINGLEA+16*, SINGLEQ+3*
OUTPUT PATLKUP~, PATLKUP+13, PATLKUP+17!, HISTLKUP~, HISTLKUP+13, HISTLKUP+17!
OUTPUT( PATLKUP+23*, HISTLKUP+23*
OUTPUT(0 PATLKUP+19*, HISTLKUP+19*
PATCHECK PATCHECK+1~, PATCHECK+13, PATCHECK+19*, PATCHECK+20*, PATCHECK+21*, PATCHECK+22*, PATCHECK+28*, PATCHECK+32*, PATCHECK+34*, PATCHECK+35
, PATCHECK+36
>> PATCHECKED( PATCHECK+2, PATCHECK+35*
PATINFO PATIENTA+2~, PATIENTA+8, PATIENT~, PATIENT+20!, PATIENT+21, PATIENT+23, PATIENT+26, PATIENT+32, PATIENT1~, PATIENT1+18
, PATIENT1+19
PID SAVEINFO~, SAVEINFO+5
PROMPT PATIENTA+2~, PATIENTA+7*, SINGLEA+11, SINGLEQ+1, MULTI+8, MULTI+9
>> QRSTACK PATIENT1+8
>> QUIT PATIENT+24*, PATIENT1+22*
RETURN PATIENT+1~, PATIENT+2*, PATIENT+10*, PATIENT+14, PATIENT+26*, PATIENT+29*, PATIENT+32*, PATIENT+34, PATIENT1+1~, PATIENT1+19*
, PATIENT1+23*, PATIENT1+25, PATIENT2+9*, PATIENT2+12*, PATIENT2+14, SINGLE+1~, SINGLE+5, SINGLE+6*, SINGLE+12*, SINGLE+15*
, SINGLE+17, SINGLEA+9*, SINGLEA+12*, SINGLEA+18*, SINGLEA+20, SINGLEQ+2*, SINGLEQ+5*, SINGLEQ+6, MULTIPLE+1~, MULTIPLE+2*
, MULTIPLE+7*, MULTIPLE+10*, MULTIPLE+11, MULTI+1~, MULTI+2*, MULTI+15*, MULTI+18
RPCERR PATIENT+1~, PATIENT+9*, PATIENT+10, PATLKUP+16~, PATLKUP+18*, PATLKUP+19, SCREEN+11~, SCREEN+12*, SCREEN+13, HISTLKUP+16~
, HISTLKUP+18*, HISTLKUP+19
SCREEN SCREEN~, SCREEN+8, SCREEN+12, SCREEN+13*, SCREEN+14
SECINFO PATCHECK+1~, PATCHECK+5, PATCHECK+8, PATCHECK+10
SECINFO( PATCHECK+15, PATCHECK+17
SECINFO(1 PATCHECK+7, PATCHECK+9, PATCHECK+13, PATCHECK+19, PATCHECK+20
SENSITIVE PATIENT+1~, PATIENT+17, PATIENT+21, SINGLE+2*, SINGLE+5, PRINTPAT+4, SAVEINFO~, SAVEINFO+6, GETINFO+3*
SENSITIVEOK PRINTPAT~, PRINTPAT+4
SEX PATIENT+1~, PATIENT+19*, PATIENT+21, PRINTPAT+5, PRINTPAT+8, SAVEINFO~, SAVEINFO+5, GETINFO+2*
SSN PATIENT+1~, PATIENT+18*, PATIENT+21, PRINTPAT+8, GETINFO+2*
STUDYCOUNT SINGLE+1~, SINGLEA+3, SINGLEA+6, SINGLEA+9
VA PATIENT+1~
VADM PATIENT+1~
VADM(1 PATIENT+18
VADM(2 PATIENT+18
VADM(3 PATIENT+18
VADM(5 PATIENT+19
VAERR PATIENT+1~
>> VAICN PATIENT+16*
>> VAINFO PATIENT+6, PATIENT+9, PATIENT+11, PATIENT+15
X PATIENT+1~, PATIENT+24, PATIENT+25, PATIENT1+1~, PATIENT1+4*, PATIENT1+5, PATIENT1+6, PATIENT1+13, PATIENT1+17*, PATIENT1+18
, SINGLEA+11, SINGLEQ+1, PATCHECK+1~, PATCHECK+8*, PATCHECK+21, PATCHECK+22, PATCHECK+27*, MULTIPLE+5*, MULTI+16*, PRINTPAT+1~
, SAVEINFO+3~, SAVEINFO+5*, SAVEINFO+6*, SAVEINFO+8, GETINFO+1*, GETINFO+2, GETINFO+3, CHANGEDT~, CHANGEDT+1*, CHANGEDT+2
Info |  Source |  Call Graph |  Caller Graph |  Entry Points |  External References |  Interaction Calls |  Global Variables Directly Accessed |  Label References |  Local Variables  | All