MAGDSTA5 ;WOIFO/PMK - Q/R Retrieve of DICOM images from PACS to VistA ; Mar 08, 2022@08:59:51
Source file <MAGDSTA5.m>
action | A | extended action | Ea | event driver | Ed | subscriber | Su | protocol | O | limited protocol | LP | run routine | RR | broker | B | edit | E | server | Se | P | screenman | SM | inquire | I |
Name | Comments | DBIA/ICR reference |
---|---|---|
MAIN() | ; The main loop for the program for Radiology
; 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 |
|
RADLKUP() | ; Find the next study to retrieve
|
|
PATIENT() | ; use ^RARPT "C" xref to find studies for a single patient
; ^RARPT("C",DFN,RARPT1)="" |
|
DATE() | ; use ^RARTPT "AA" xref to find studies by verified date
; ^RARPT("AA",RADTI,RARPT1)="" |
|
NUMBER() | ; use ^RARPT ien
; ^RARPT(RARPT1,... |
|
RADLKUP1(RARPT1) | ; lookup one radiology exam
|
|
SETDATES(DATEBEG,DATESTOP,BEGDATE,ENDDATE,DIRECTION) | ; get date range
; get the beginning and ending dates for the FOR loop ; these are in RARPT reverse date format ; they are also DIRECTION specific |
|
RADTI(RADTI) | ; convert a reverse date to a FM date and vice versa
|
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^RADPT - [#70] | RADLKUP1+9 |
^RARPT - [#74] | PATIENT+6, DATE+12, NUMBER+8, NUMBER+9, RADLKUP1+3, RADLKUP1+15, RADLKUP1+16 |
^RARPT("AA" | DATE+7, DATE+11 |
^RARPT("C" | PATIENT+5 |
^TMP("MAG" | NUMBER+5, NUMBER+6 |
Name | Line Occurrences |
---|---|
$$DATE | RADLKUP+6 |
$$NUMBER | RADLKUP+9 |
$$PATIENT | RADLKUP+3 |
$$RADLKUP | MAIN+15 |
$$RADLKUP1 | PATIENT+10, DATE+15, NUMBER+14 |
$$RADTI | RADLKUP1+8, SETDATES+5, SETDATES+6, SETDATES+9, SETDATES+10 |
SETDATES | DATE+4 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ACNUMB | RADLKUP1+1~, RADLKUP1+4*, RADLKUP1+19 |
BATCHSIZE | NUMBER+2~, NUMBER+5*, NUMBER+8 |
BEGDATE | PATIENT+8, DATE+4, SETDATES~, SETDATES+5, SETDATES+10 |
DATEBEG | DATE+2~, DATE+4, DATE+5, SETDATES~, SETDATES+5*, SETDATES+9* |
DATESTOP | DATE+2~, DATE+4, DATE+8, DATE+9, SETDATES~, SETDATES+6*, SETDATES+10* |
DFN | PATIENT+5, RADLKUP1+1~, RADLKUP1+4*, RADLKUP1+9, RADLKUP1+19 |
DIRECTION | PATIENT+5, DATE+4, DATE+7, DATE+8, DATE+11, NUMBER+7, NUMBER+8, SETDATES~, SETDATES+4 |
>> DIVISION | RADLKUP1+11 |
DONE | DATE+2~, DATE+5*, DATE+7, DATE+8*, DATE+9* |
ENDDATE | PATIENT+8, DATE+4, SETDATES~, SETDATES+6, SETDATES+9 |
EXAMDATE | PATIENT+2~, PATIENT+7*, PATIENT+8, RADLKUP1+1~, RADLKUP1+5*, RADLKUP1+8, RADLKUP1+19 |
HOSPDIV | RADLKUP1+1~, RADLKUP1+10*, RADLKUP1+11 |
MAGIEN | RADLKUP1+1~, RADLKUP1+16*, RADLKUP1+17 |
MAGIENLIST | RADLKUP1+1~, RADLKUP1+19 |
MAGIENLIST( | RADLKUP1+17* |
RADPT0 | RADLKUP1+1~, RADLKUP1+9*, RADLKUP1+10 |
RADTI | DATE+2~, DATE+5*, DATE+7*, DATE+8, DATE+9, DATE+11, RADLKUP1+1~, RADLKUP1+8*, RADLKUP1+9, RADTI~ , RADTI+1 |
RARPT0 | PATIENT+2~, PATIENT+6*, PATIENT+7, DATE+2~, DATE+12*, DATE+13, NUMBER+2~, NUMBER+9*, NUMBER+10, RADLKUP1+1~ , RADLKUP1+3*, RADLKUP1+4, RADLKUP1+5 |
RARPT1 | MAIN+10~, PATIENT+2~, PATIENT+4*, PATIENT+5*, PATIENT+6, PATIENT+10, DATE+2~, DATE+10*, DATE+11*, DATE+12 , DATE+15, NUMBER+2~, NUMBER+6*, NUMBER+7*, NUMBER+8*, NUMBER+9, NUMBER+14, RADLKUP1~, RADLKUP1+3, RADLKUP1+15 , RADLKUP1+16, RADLKUP1+19 |
RARPT3 | RADLKUP1+1~, RADLKUP1+14*, RADLKUP1+15*, RADLKUP1+16 |
RETURN | PATIENT+2~, DATE+2~, DATE+5*, NUMBER+2~ |
RUNTIME | MAIN+10~ |
>> SCANMODE | RADLKUP+2, RADLKUP+5, RADLKUP+8, RADLKUP+12 |
STATUS | PATIENT+2~, PATIENT+7*, PATIENT+9, DATE+2~, DATE+13*, DATE+14, NUMBER+2~, NUMBER+10*, NUMBER+12 |
STOP | MAIN+10~, MAIN+15*, MAIN+16, RADLKUP+1~, RADLKUP+3*, RADLKUP+6*, RADLKUP+9*, RADLKUP+13*, RADLKUP+15, PATIENT+2~ , PATIENT+3*, PATIENT+5, PATIENT+10*, PATIENT+12, DATE+2~, DATE+3*, DATE+7, DATE+11, DATE+15*, DATE+18 , NUMBER+2~, NUMBER+3*, NUMBER+8, NUMBER+14*, NUMBER+16 |
STUDYCNT | NUMBER+2~, NUMBER+4*, NUMBER+8, NUMBER+13* |
X | MAIN+10~ |