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

Package: Imaging

Routine: MAGDSTA7


Information

MAGDSTA7 ;WOIFO/PMK - Q/R Retrieve of DICOM images from PACS to VistA ; Mar 04, 2022@13:42:59

Source Information

Source file <MAGDSTA7.m>

Entry Points

Name Comments DBIA/ICR reference
MAIN() ; The main loop for the program for consults and procedures
; Input Variables
; SCANMODE ;-- "PATIENT", "DATE", or "NUMBER"
; DIRECTION ;- 1="ASCENDING" or 0="DESCENDING"
; BATCHSIZE ;- number of consult & procedure requests to process on this run
; BEGDATE ;--- begin date for search
; ENDDATE ;-- end date for search
; QRSCP ;----- default query/retrieve provider
; HOURS ;----- 24 character string of Y's and N's indicating active times
;
CONLKUP() ; Find the next study to retrieve
PATIENT() ; use "AD" cross-reference to find studies for a single patient
; ^GMR(123,"AD",DFN,GMRCDATE,GMRCIEN)=""
DATE() ; use "AE" cross-reference to find completed studies
; ^GMR(123,"AE",SERVICE,STATUS,GMRCDATE,GMRCIEN)=""
; only look for COMPLETED studies and PARTIAL RESULTS
NUMBER() ; use GMRCIEN to find completed studies
; ^GMR(123,GMRC)=<consult record>
CONLKUP1(GMRCIEN) ; check consult
CONSULT(GMRCIEN,MAGIENLIST) ; return a list of MAG Group IENs
; A consult may have multiple TIU notes and a TIU note may have multiple image groups.
; A consult may also have images associated in the DICOM TEMP LIST file (#2006.5839).
CONSULT1(GMRCIEN,TIULIST) ; return a list of TIU IENs
; a consult may have multiple TIU notes - get the list
T892591(TIUIEN,MAGIENLIST) ;
SETDATES(DATEBEG,DATESTOP,BEGDATE,ENDDATE,DIRECTION) ; get date range
; get the beginning and ending dates for the FOR loop
; these are in GMRC reverse date format
; they are also DIRECTION specific
GMRCDATE(GMRCDATE) ; convert a GMRC date to a FM date and vice versa
HEADER(CONTINUE) ;

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !!,"*** Illegal SCAN MODE: """,SCANMODE,""""
  • Line Location: CONLKUP+12
Function Call: WRITE
  • Prompt: !!,CONSULTSERVICES(SERVICE)," -- "
  • Line Location: DATE+8
Function Call: WRITE
  • Prompt: $S(STATUS=2:"COMPLETE",STATUS=9:"PARTIAL RESULTS",1:"Unknown Status "_STATUS)
  • Line Location: DATE+9
Function Call: WRITE
  • Prompt: @IOF," Patient",?12," Accession ",?30," Date",?40,"Images",?51,"Group #",?60,"VistA",?68,"PACS",?75,"Need"
  • Line Location: HEADER+2
Function Call: WRITE
  • Prompt: !,"---------",?12,"----------------",?30,"--------",?40,"------",?51,"-------",?60,"-----",?68,"----",?75,"----"
  • Line Location: HEADER+3

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^GMR(123 - [#123] GET1^DIQ,  GETS^DIQ
^TIU(8925.91 - [#8925.91] GET1^DIQ
Info |  Source |  Entry Points |  Interaction Calls |  FileMan Files Accessed Via FileMan Db Call