MAGDLB9 ;WOIFO/LB/JSL/SAF - DICOM correct entries ; 01/30/2004 17:14
;;3.0;IMAGING;**11,123**;Mar 19, 2002;Build 67;Jul 24, 2012
;; Per VHA Directive 2004-038, this routine should not be modified.
;; +---------------------------------------------------------------+
;; | Property of the US Government. |
;; | No permission to copy or redistribute this software is given. |
;; | Use of unreleased versions of this software requires the user |
;; | to execute a written test agreement with the VistA Imaging |
;; | Development Office of the Department of Veterans Affairs, |
;; | telephone (301) 734-0100. |
;; | The Food and Drug Administration classifies this software as |
;; | a medical device. As such, it may not be changed in any way. |
;; | Modifications to this software may result in an adulterated |
;; | medical device under 21CFR820, the use of which is considered |
;; | to be a violation of US Federal Statutes. |
;; +---------------------------------------------------------------+
;;
Q
EN() ;Start looping either by patient or loop thru Study uid
N DIR,X,Y
S DIR(0)="S^P:Patient;L:Loop thru file;D:Specify a Date Range"
S DIR("A")="Update entries by"
D ^DIR
Q Y
;
START ;
N KFIXALL,MAGSORT,MAGIEN,PREV,START,STOP,X,Y
N MAGTYPE ; -- type of image
S MAGSORT=$$EN Q:MAGSORT["^"
S KFIXALL=$$SECKEY^MAGDLB12()
I MAGSORT="P" D G EXIT
. D SRT^MAGDLBSR S MAGIEN=$$SELECT Q:MAGIEN<1
. I 'KFIXALL,$P($G(^MAGD(2006.575,MAGIEN,1)),"^",5)'=$G(DUZ(2)) D Q
. . W !,"The entry selected was not captured on your site's gateway."
. . W !,"You are not authorized to correct another site's entries."
. . Q
. S MAGTYPE=$P($G(^MAGD(2006.575,MAGIEN,"TYPE")),U)
. I "^CON^MED^"[(U_MAGTYPE_U) D Q
. . W !,"Use the MAGD FIX "
. . W $S(MAGTYPE="MED":"MEDICINE",1:"CLINSPEC")
. . W " menu option to correct this entry."
. . Q
. S PREV=MAGIEN D SET^MAGDLB1
I MAGSORT="D" D G EXIT
. D SRTDT^MAGDLBSR
. D ASKDT^MAGDLBSR
. I '$D(STR)!('$D(STP)) Q
. S START=STR,STOP=STP K STR,STP
. D DATELOOP^MAGDLB1(START,STOP)
E D LOOP^MAGDLB12
EXIT ;
K ANS,ANSR,CASENO,COMNT1,DATA,DATA1,DATA2,DATE,FILE,FIRST,FIRSTS,I,MACHID,MAGDY
K MAGDIEN,MAGCSE,MAGERR,MAGFIX,MAGDTPRT,MAGTYPE,MAGDTPRT,MAGSTP,MSG
K MOD,MODEL,NEWCAS,NEWDFN,NEWDTI,NEWDTIM,NEWMUL,NEWNME,NEWPIEN,NEWPROC
K NEWPID,OK,OOUT,OUT,PAT,PID,PREV,PREVS,REASON,STUDYUID,SUID,WHY
Q
SELECT() ;
N DIC,D,X,Y
S DIC="^MAGD(2006.575,",D="D",DIC(0)="AE"
D MIX^DIC1
Q +Y
SLDATE() ;
N DIC,D,X,Y
S DIC="^MAGD(2006.575,",D="AD",DIC(0)="AE"
D MIX^DIC1
Q +Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGDLB9 2700 printed Nov 22, 2024@17:10:47 Page 2
MAGDLB9 ;WOIFO/LB/JSL/SAF - DICOM correct entries ; 01/30/2004 17:14
+1 ;;3.0;IMAGING;**11,123**;Mar 19, 2002;Build 67;Jul 24, 2012
+2 ;; Per VHA Directive 2004-038, this routine should not be modified.
+3 ;; +---------------------------------------------------------------+
+4 ;; | Property of the US Government. |
+5 ;; | No permission to copy or redistribute this software is given. |
+6 ;; | Use of unreleased versions of this software requires the user |
+7 ;; | to execute a written test agreement with the VistA Imaging |
+8 ;; | Development Office of the Department of Veterans Affairs, |
+9 ;; | telephone (301) 734-0100. |
+10 ;; | The Food and Drug Administration classifies this software as |
+11 ;; | a medical device. As such, it may not be changed in any way. |
+12 ;; | Modifications to this software may result in an adulterated |
+13 ;; | medical device under 21CFR820, the use of which is considered |
+14 ;; | to be a violation of US Federal Statutes. |
+15 ;; +---------------------------------------------------------------+
+16 ;;
+17 QUIT
EN() ;Start looping either by patient or loop thru Study uid
+1 NEW DIR,X,Y
+2 SET DIR(0)="S^P:Patient;L:Loop thru file;D:Specify a Date Range"
+3 SET DIR("A")="Update entries by"
+4 DO ^DIR
+5 QUIT Y
+6 ;
START ;
+1 NEW KFIXALL,MAGSORT,MAGIEN,PREV,START,STOP,X,Y
+2 ; -- type of image
NEW MAGTYPE
+3 SET MAGSORT=$$EN
if MAGSORT["^"
QUIT
+4 SET KFIXALL=$$SECKEY^MAGDLB12()
+5 IF MAGSORT="P"
Begin DoDot:1
+6 DO SRT^MAGDLBSR
SET MAGIEN=$$SELECT
if MAGIEN<1
QUIT
+7 IF 'KFIXALL
IF $PIECE($GET(^MAGD(2006.575,MAGIEN,1)),"^",5)'=$GET(DUZ(2))
Begin DoDot:2
+8 WRITE !,"The entry selected was not captured on your site's gateway."
+9 WRITE !,"You are not authorized to correct another site's entries."
+10 QUIT
End DoDot:2
QUIT
+11 SET MAGTYPE=$PIECE($GET(^MAGD(2006.575,MAGIEN,"TYPE")),U)
+12 IF "^CON^MED^"[(U_MAGTYPE_U)
Begin DoDot:2
+13 WRITE !,"Use the MAGD FIX "
+14 WRITE $SELECT(MAGTYPE="MED":"MEDICINE",1:"CLINSPEC")
+15 WRITE " menu option to correct this entry."
+16 QUIT
End DoDot:2
QUIT
+17 SET PREV=MAGIEN
DO SET^MAGDLB1
End DoDot:1
GOTO EXIT
+18 IF MAGSORT="D"
Begin DoDot:1
+19 DO SRTDT^MAGDLBSR
+20 DO ASKDT^MAGDLBSR
+21 IF '$DATA(STR)!('$DATA(STP))
QUIT
+22 SET START=STR
SET STOP=STP
KILL STR,STP
+23 DO DATELOOP^MAGDLB1(START,STOP)
End DoDot:1
GOTO EXIT
+24 IF '$TEST
DO LOOP^MAGDLB12
EXIT ;
+1 KILL ANS,ANSR,CASENO,COMNT1,DATA,DATA1,DATA2,DATE,FILE,FIRST,FIRSTS,I,MACHID,MAGDY
+2 KILL MAGDIEN,MAGCSE,MAGERR,MAGFIX,MAGDTPRT,MAGTYPE,MAGDTPRT,MAGSTP,MSG
+3 KILL MOD,MODEL,NEWCAS,NEWDFN,NEWDTI,NEWDTIM,NEWMUL,NEWNME,NEWPIEN,NEWPROC
+4 KILL NEWPID,OK,OOUT,OUT,PAT,PID,PREV,PREVS,REASON,STUDYUID,SUID,WHY
+5 QUIT
SELECT() ;
+1 NEW DIC,D,X,Y
+2 SET DIC="^MAGD(2006.575,"
SET D="D"
SET DIC(0)="AE"
+3 DO MIX^DIC1
+4 QUIT +Y
SLDATE() ;
+1 NEW DIC,D,X,Y
+2 SET DIC="^MAGD(2006.575,"
SET D="AD"
SET DIC(0)="AE"
+3 DO MIX^DIC1
+4 QUIT +Y