MAGDCCSD ;WOIFO/MLH/JSL/SAF - DICOM Correct - Clinical Specialties - Driver ; 01/30/2004 17:14
;;3.0;IMAGING;**10,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 MAGSORT,MAGIEN,PREV,START,STOP,X,Y
N KFIXALL ; -- does user hold MAGDFIX ALL key
;
S KFIXALL=$$SECKEY^MAGDLB12()
S MAGSORT=$$EN Q:MAGSORT["^"
I MAGSORT="P" D G EXIT
. L +^MAGD(2006.575,"D"):1E9 D SRT^MAGDCCSS S MAGIEN=$$SELECT L -^MAGD(2006.575,"D"):1E9 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
. I $D(^MAGD(2006.575,MAGIEN,"TYPE")),$P(^("TYPE"),"^")'="CON" D Q
. . W !,"Only Clinical Specialties images may be fixed using this option."
. . Q
. S PREV=MAGIEN D SET^MAGDCCS
. Q
I MAGSORT="D" D G EXIT
. D SRTDT^MAGDCCSS
. D ASKDT^MAGDCCSS
. I '$D(STR)!'($D(STP)) Q
. S START=STR,STOP=STP K STR,STP
. D DATELOOP^MAGDCCS(START,STOP)
. Q
E D
. D L^MAGDCCS
. Q
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)="AEQ"
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[HMAGDCCSD 2747 printed Dec 13, 2024@01:59:46 Page 2
MAGDCCSD ;WOIFO/MLH/JSL/SAF - DICOM Correct - Clinical Specialties - Driver ; 01/30/2004 17:14
+1 ;;3.0;IMAGING;**10,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 MAGSORT,MAGIEN,PREV,START,STOP,X,Y
+2 ; -- does user hold MAGDFIX ALL key
NEW KFIXALL
+3 ;
+4 SET KFIXALL=$$SECKEY^MAGDLB12()
+5 SET MAGSORT=$$EN
if MAGSORT["^"
QUIT
+6 IF MAGSORT="P"
Begin DoDot:1
+7 LOCK +^MAGD(2006.575,"D"):1E9
DO SRT^MAGDCCSS
SET MAGIEN=$$SELECT
LOCK -^MAGD(2006.575,"D"):1E9
if MAGIEN<1
QUIT
+8 IF 'KFIXALL
IF $PIECE($GET(^MAGD(2006.575,MAGIEN,1)),"^",5)'=$GET(DUZ(2))
Begin DoDot:2
+9 WRITE !,"The entry selected was not captured on your site's gateway."
+10 WRITE !,"You are not authorized to correct another site's entries."
+11 QUIT
End DoDot:2
QUIT
+12 IF $DATA(^MAGD(2006.575,MAGIEN,"TYPE"))
IF $PIECE(^("TYPE"),"^")'="CON"
Begin DoDot:2
+13 WRITE !,"Only Clinical Specialties images may be fixed using this option."
+14 QUIT
End DoDot:2
QUIT
+15 SET PREV=MAGIEN
DO SET^MAGDCCS
+16 QUIT
End DoDot:1
GOTO EXIT
+17 IF MAGSORT="D"
Begin DoDot:1
+18 DO SRTDT^MAGDCCSS
+19 DO ASKDT^MAGDCCSS
+20 IF '$DATA(STR)!'($DATA(STP))
QUIT
+21 SET START=STR
SET STOP=STP
KILL STR,STP
+22 DO DATELOOP^MAGDCCS(START,STOP)
+23 QUIT
End DoDot:1
GOTO EXIT
+24 IF '$TEST
Begin DoDot:1
+25 DO L^MAGDCCS
+26 QUIT
End DoDot:1
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)="AEQ"
+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