MAGDSTA8 ;WOIFO/PMK - Q/R Retrieve of DICOM images from PACS to VistA ; Feb 15, 2022@10:50:15
Source file <MAGDSTA8.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| LEGACY(GROUPIEN,SERIESCOUNT,IMAGECOUNT) | ; get all the UIDs for the imaging group
 | 
|
| NEWSOPDB(ACNUMB,SERIESCOUNT,IMAGECOUNT) | ; look for UIDs in the P34 database for the new SOP Classes
 ; Rules: ; 1) the Attribute On File field is not checked at all. ; 2) for the Procedure Reference file (#2005.61), there has to be a pointer to the Patient ; Reference file (#2005.6) and the patient id type in file #2005.6 needs to be "DFN". ; 3) for the Image Study file (#2005.62), the study must be "accessible" and AOF ; 4) for the Image Series file (#2006.63), the series must be "accessible" and AOF ; 5) for the SOP Instance file ("2006.64), the SOP instance must be "accessible" and AOF  | 
|
| PROBLEM61(PROCIX) | ; check both file 2005.6 and 2005.61
 | 
|
| PROBLEM62(STUDYIX) | ; check file 2005.62
 | 
|
| PROBLEM63(SERIESIX) | ; check file 2005.63
 | 
|
| PROBLEM64(SOPIX) | ; check file 2005.64
 | 
|
| PROBLEM65(IMAGEIX) | ; check file 2005.65
 | 
|
| SERIES(VISTASTUDYUID,SERIESUID,SERIESCOUNT) | ; increment series counters
 | 
|
| IMAGE(VISTASTUDYUID,SERIESUID,SOPUID,IMAGECOUNNT) | ; increment image counters
 | 
|
| SERVICES(CONSULTSERVICES,GETQRSCP) | ; get services to query
 | 
|
| SERVICE1 | ; present selection screen(s)
 | 
|
| SERVICE2 | ; select the service from a screen full  
 | 
|
| SERVICE3 | ; output one service
 | 
|
| SERVICE4(CONSULTSERVICES,GETQRSCP,LIST,PICK) | ; build list of selected services, by ien
 | 
|
| QRSCP() | ; get the q/r scp for the consult
 | 
| Name | Line Occurrences | 
|---|---|
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: READ | 
  | 
| Function Call: READ | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| Function Call: WRITE | 
  | 
| FileNo | Call Tags | 
|---|---|
| ^GMR(123 - [#123] | GET1^DIQ | 
| ^GMR(123.3 - [#123.3] | GET1^DIQ | 
| ^GMR(123.5 - [#123.5] | GET1^DIQ | 
| ^MAG(2006.5831 - [#2006.5831] | GET1^DIQ |