MAGDSTAF ;WOIFO/PMK - Q/R Retrieve of DICOM images from PACS to VistA ; Sep 17, 2020@13:11:24
Source file <MAGDSTAF.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 |
---|---|---|
GETIMAGE(PACSSERIESUID) | ; retrieve one series of "PACS ONLY" SOP Instances
|
|
STUDYUID(PACSSTUDYUID,PACSSERIESUID) | ; process one PACS Study Instance UID
|
|
GETSOPU(PACSSTUDYUID,PACSSERIESUID) | ; query for the SOP Instance UIDs for the series
|
|
UIDCOMP(PACSSTUDYUID,PACSSERIESUID) | ;
; Compare the UIDs between those on PACS with those on VistA ; Return a count of UIDs on both as well as lists of missing ones ; ; Note that both PACS and VistA may have multiple Study Instance UIDs ; and that they may be different. ; ; Input: ^TMP("MAG",$J,"UIDS","VISTA",VISTASTUDYUID,SERIESUID,SOPUID)="" ; ^TMP("MAG",$J,"UIDS","PACS",PACSSTUDYUID,SERIESUID,SOPUID)="" ; ; Output: BOTH - count of identical UIDs on both VistA and PACS ; ^TMP("MAG",$J,"UIDS","PACS ONLY",PACSSTUDYUID,SERIESUID,SOPUID)="" ; ^TMP("MAG",$J,"UIDS","VISTA ONLY",VISTASTUDYUID,SERIESUID,SOPUID)="" ; ^TMP("MAG",$J,"UIDS","COUNTS","BOTH") ; ^TMP("MAG",$J,"UIDS","COUNTS","PACS") ; ^TMP("MAG",$J,"UIDS","COUNTS","PACS ONLY") ; ^TMP("MAG",$J,"UIDS","COUNTS","VISTA") ; ^TMP("MAG",$J,"UIDS","COUNTS","VISTA ONLY") ; |
|
UIDLIST(SYSTEM,STUDYUID,SERIESUID,ARRAY) | ; get an array of Series and SOP Instance UIDs
|
|
SUBTRACT(A,B,C,MISSING,SAME) | ; UID set subtraction
; A, B, and C are arrays of Series and SOP Instance UIDs ; C = all the nodes of A minus the nodes of B |
|
TEST1 | ; test of SUBTRACT subroutine
; N A,B,C,MISSING,SAME |
|
TEST1A | ; output
|
|
TEST2 | ; test of UIDCOMP subroutine
|
|
TEST2A(SERIESUID) | ; report
|
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^TMP("MAG" | GETIMAGE+7, STUDYUID+10!, STUDYUID+11*, STUDYUID+12*, STUDYUID+13*, STUDYUID+14*, STUDYUID+15*, STUDYUID+17, STUDYUID+18*, GETSOPU+2! , GETSOPU+3!, GETSOPU+4*, GETSOPU+5*, GETSOPU+6*, GETSOPU+7*, GETSOPU+8*, GETSOPU+13*, GETSOPU+15*, UIDCOMP+20!, UIDCOMP+23* , UIDCOMP+27*, UIDCOMP+28, UIDCOMP+30*, UIDCOMP+35*, UIDCOMP+36*, UIDCOMP+37*, UIDLIST+6, TEST2+3!, TEST2+4*, TEST2+5* , TEST2+6*, TEST2+7*, TEST2A+3 |
^XTMP( | GETSOPU+10, GETSOPU+12 |
Name | Field # of Occurrence |
---|---|
^("PACS ONLY" | UIDCOMP+20! |
^("VISTA ONLY" | UIDCOMP+20! |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
A | SUBTRACT~, SUBTRACT+5, TEST1+6, TEST1+9, TEST2A+2*, TEST2A+3 |
A( | SUBTRACT+7, SUBTRACT+9 |
A(1 | TEST1+2* |
A(2 | TEST1+3* |
ARRAY | UIDLIST~ |
ARRAY( | UIDLIST+7* |
B | SUBTRACT~, TEST1+6, TEST1+9 |
B( | SUBTRACT+10 |
B(1 | TEST1+4* |
B(2 | TEST1+5* |
BOTH | UIDCOMP+19~, UIDCOMP+34, UIDCOMP+35 |
C | SUBTRACT~, SUBTRACT+4!, SUBTRACT+5*, TEST1+6, TEST1+9 |
C( | SUBTRACT+11!, TEST1A+3, TEST1A+5, TEST1A+6 |
COUNT | GETSOPU+1~, GETSOPU+10*, GETSOPU+11, GETSOPU+15, UIDCOMP+19~, UIDCOMP+29*, UIDCOMP+30, UIDLIST+1~, UIDLIST+2*, UIDLIST+8* , UIDLIST+10 |
>> HOSTNAME | GETSOPU+10, GETSOPU+12 |
I | STUDYUID+1~, STUDYUID+16*, STUDYUID+18*, STUDYUID+20*, STUDYUID+21, STUDYUID+22, STUDYUID+28, GETSOPU+1~, GETSOPU+11*, GETSOPU+12 , TEST2+1~, TEST2+4*, TEST2+5*, TEST2+6*, TEST2+7* |
>> MAGXTMP | GETSOPU+10, GETSOPU+12 |
MISSING | UIDCOMP+34, UIDCOMP+36, SUBTRACT~, SUBTRACT+4*, SUBTRACT+15*, TEST1+6, TEST1+7, TEST1+9, TEST1+10 |
MISSINGUIDS | UIDCOMP+19~, UIDCOMP+34, UIDCOMP+37 |
PACSSERIESUID | GETIMAGE~, GETIMAGE+7, GETIMAGE+8, STUDYUID~, STUDYUID+4, STUDYUID+6, STUDYUID+12, STUDYUID+17, GETSOPU~, GETSOPU+3 , GETSOPU+5, GETSOPU+13, GETSOPU+15, UIDCOMP~, UIDCOMP+23, UIDCOMP+28, UIDCOMP+29 |
PACSSTUDYUID | GETIMAGE+1~, GETIMAGE+6*, GETIMAGE+7*, GETIMAGE+8, STUDYUID~, STUDYUID+4, STUDYUID+6, STUDYUID+11, STUDYUID+17, GETSOPU~ , GETSOPU+3, GETSOPU+4, GETSOPU+13, GETSOPU+15, UIDCOMP~, UIDCOMP+23, UIDCOMP+37, TEST2+1~, TEST2+2*, TEST2+5 , TEST2+7, TEST2+8, TEST2+11 |
PACSUIDS | UIDCOMP+19~, UIDCOMP+23, UIDCOMP+34 |
>> QRSTACK | STUDYUID+11, STUDYUID+12, STUDYUID+13, STUDYUID+14, STUDYUID+15, STUDYUID+18, GETSOPU+4, GETSOPU+5, GETSOPU+6, GETSOPU+7 , GETSOPU+8, GETSOPU+10, GETSOPU+12 |
SAME | SUBTRACT~, SUBTRACT+4*, SUBTRACT+12*, TEST1+6, TEST1+7, TEST1+9, TEST1+10 |
SERIESUID | UIDLIST~, UIDLIST+6, UIDLIST+7, TEST2A~, TEST2A+1 |
SOPUID | STUDYUID+1~, STUDYUID+16*, STUDYUID+17*, STUDYUID+18, GETSOPU+1~, GETSOPU+12*, GETSOPU+13, UIDLIST+1~, UIDLIST+5*, UIDLIST+6* , UIDLIST+7 |
SS1 | SUBTRACT+3~, SUBTRACT+6*, SUBTRACT+7*, SUBTRACT+9, SUBTRACT+10, SUBTRACT+11, TEST1A+1~, TEST1A+2*, TEST1A+3*, TEST1A+5 , TEST1A+6 |
SS2 | SUBTRACT+3~, SUBTRACT+8*, SUBTRACT+9*, SUBTRACT+10, SUBTRACT+11, TEST1A+1~, TEST1A+4*, TEST1A+5*, TEST1A+6 |
STUDYUID | UIDLIST~, UIDLIST+6 |
SYSTEM | UIDLIST~, UIDLIST+6 |
VISTASTUDYUID | UIDCOMP+19~, UIDCOMP+27*, UIDCOMP+28*, UIDCOMP+29, TEST2+1~, TEST2+2*, TEST2+4, TEST2+6, TEST2+8, TEST2+11 |
VISTAUIDS | UIDCOMP+19~, UIDCOMP+29, UIDCOMP+34 |