- MAGGTU3 ;WOIFO/GEK/SG/NST - Silent calls for Imaging ; 21 Jun, 2023@13:43:01
- ;;3.0;IMAGING;**7,8,48,45,20,46,59,93,117,151,356**;Mar 19, 2002;Build 8
- ;; 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
- IMAGEINF(MAGRY,IEN,NOCHK) ;RPC [MAGG IMAGE INFO] Call to return information for 1 image;
- ; IEN = Image IEN ^MAG(2005,IEN
- ; NOCHK = 1|"" if 1 then do not run QA check on this image.
- ;
- N ERR,MAGFILE,Y,Z,MAGNOCHK
- ;--- Check if the image is deleted
- I $$ISDEL^MAGGI11(IEN,.ERR) D Q
- . S Y=$$NODE^MAGGI11(IEN) S:Y'="" Y=$G(@Y@(2))
- . S MAGRY(0)="0^Image : """_$P(Y,U,4)_""" has been deleted."
- . Q
- ;--- Check for errors. Ignore the problem if there are 2 records
- ; with the same IEN in files #2005 and #2005.1. After the file
- ;--- #2005.1 is completeley eliminated, ",+ERR'=-43" can be deleted.
- I ERR<0,+ERR'=-43 S MAGRY(0)="0^INVALID Image number "_IEN Q
- ;--- MAGGTII queries the variable MAGNOCHK to run QA check or not.
- S MAGNOCHK=+$G(NOCHK)
- S MAGFILE=$$INFO^MAGGAII(IEN,"E")
- S Z=$P(^MAG(2005,IEN,0),U,7)
- I '$D(^DPT(Z)) S Z="1^Invalid patient pointer"
- E S Z=Z_U_$P(^DPT(Z,0),U)
- S MAGRY(0)="1^"_MAGFILE
- S MAGRY(1)=Z ; dfn^name
- Q
- USERINF2(MAGRY,MAGWRKID) ;RPC [MAGGUSER2] Return user info.
- ; MAGRY(1) = DUZ ^ FULL NAME ^ INITIALS
- ; MAGRY(2) = Network UserName ^ PassWord.
- ; MAGRY(3) = MUSE Site number. ( default = 1)
- ; Node 4 is data from IMAGING SITE PARAMATERS File #2006.1 and INSTITUTION File #4
- ; MAGRY(4)= PLACE IEN ^ SITE CODE ^ DUZ(2) ^ INSTITUTION NAME (.01) ^ $$CONSOLID ^ User's local STATION NUMBER (99)
- ; MAGRY(5) = +<CP Version>|0 ^ Version of CP installed on Server
- ; MAGRY(6) = Warning message if we can't resolve which Site Parameter entry to use.
- ; MAGRY(7) = Warning message <reserved for future>
- ; MAGRY(8) = 1|0 1 = Production account 0 = Test Account (or couldn't determine) ;Patch 41
- ; MAGRY(9) = Vista Site Service PHYSICAL REFERENCE from Network Location File.
- ; MAGRY(10)=Domain Name
- ; MAGRY(11)=Primary Division IEN
- ; MAGRY(12)=Primary Division STATION NUMBER
- ; p151 Added 13 and 14
- ; MAGRY(13)=Clinical Display User Manual URL
- ; MAGRY(14)=Clinical Capture User Manual URL
- ;
- N J,K,Y,MAGPLC,MAGWARN,MAGWARN1,VSRV,PHYREF,X,XUSAPP,ISTELER ; SEB 9/20/2002 - P356 CD 06/20/2023
- S MAGPLC=0
- I $D(DUZ(2)) S MAGPLC=+$$PLACE^MAGBAPI(DUZ(2)) ; DBI - SEB 9/20/2002
- ;
- ; SET THE PARTITION VARIABLE MAGSYS i.e.'IGK_Garrett's Desk'
- S MAGSYS=$G(MAGWRKID,"")
- I +$G(DUZ)=0 S MAGRY(0)="0^DUZ Undefined, Null or Zero" Q
- I 'MAGPLC D
- . S MAGWARN="Can't resolve Site Param, DUZ(2): "_$S($D(DUZ(2)):DUZ(2),1:"NULL")_" DUZ: "_DUZ
- . S MAGPLC=$$DUZ2PLC^MAGBAPIP(.MAGWARN1) ; DBI - SEB 9/20/2002
- . Q
- S MAGRY(0)="1^"
- ; DUZ FULL NAME INITIALS
- S MAGRY(1)=DUZ_U_$$GET1^DIQ(200,DUZ_",",.01)_U_$$GET1^DIQ(200,DUZ_",",1)
- ; NOW NET STUFF
- I 'MAGPLC Q
- ; From IMAGING SITE PARAMETERS File
- ; get the Network UserName and PassWord.
- S MAGRY(2)=$P($G(^MAG(2006.1,MAGPLC,"NET")),U,1,2)
- ; get the default MUSE Site number.
- S MAGRY(3)=+$P($G(^MAG(2006.1,MAGPLC,"USERPREF")),U,2)
- ; default to 1 if nothing is entered in Site Parameters File
- I MAGRY(3)=0 S MAGRY(3)=1
- ; This SITEIEN^SITECODE^USER INSTITUTION IEN^INSTITUTION NAME^CONSOLIDATED^User's local STATION NUMBER
- ; is used by Display to determine location of Workstation
- ; and used by Capture to determine the Write Location.
- S MAGRY(4)=MAGPLC_U_$$GET1^DIQ(2006.1,MAGPLC,.09)_U_$G(DUZ(2))_U_$$GET1^DIQ(2006.1,MAGPLC,.01,"E")
- S MAGJOB("PLC")=MAGPLC
- S MAGJOB("PLCODE")=$$GET1^DIQ(2006.1,MAGPLC,.09)
- S MAGRY(4)=MAGRY(4)_U_$$CONSOLID^MAGBAPI_U_$$GET1^DIQ(4,DUZ(2),99,"E")
- ; is CP not installed at this site, the Client will hide options
- ; related to CP.
- S X=$$VERSION^XPDUTL("CLINICAL PROCEDURES")
- S MAGRY(5)=+X_U_X
- S MAGRY(6)=$G(MAGWARN)
- S MAGRY(7)=$G(MAGWARN1)
- S MAGRY(8)=$S($L($T(PROD^XUPROD)):+$$PROD^XUPROD,1:0)
- S VSRV=$P($G(^MAG(2006.1,MAGPLC,"NET")),"^",5)
- I VSRV I +$P($G(^MAG(2005.2,VSRV,0)),"^",6) S PHYREF=$P($G(^MAG(2005.2,VSRV,0)),"^",2)
- ; Start Site Service URL (9) for TeleReader Client, otherwise PHYREF - P356 CD 06/21/2023
- S XUSAPP=$P($G(DUZ("REMAPP")),U,2)
- S:XUSAPP'="" ^TMP($J,"MAGTELER")=0
- S ISTELER=$S(XUSAPP="VISTA IMAGING TELEREADER":1,$G(^TMP($J,"MAGTELER")):1,1:0)
- S MAGRY(9)=$S(ISTELER:$$GET^XPAR("SYS","MAG TELER SSERV URL",1,"Q"),1:$G(PHYREF))
- K ^TMP($J,"MAGTELER") ; Kill TeleReader Boolean set in MAGGTU4 - P356 CD 06/21/2023
- ; End of Site Service URL (9) setting with custom TeleReader handling - P356 CD 06/21/2023
- S MAGRY(10)=$$KSP^XUPARAM("WHERE")
- S MAGRY(11)=$P($$SITE^VASITE(),"^")
- S MAGRY(12)=$P($$SITE^VASITE(),"^",3)
- S MAGRY(13)=$P($G(^MAG(2006.1,MAGPLC,"HELPD")),"^",1) ; p151
- S MAGRY(14)=$P($G(^MAG(2006.1,MAGPLC,"HELPC")),"^",1) ; p151
- Q
- ;
- CATEGORY(MAGRY) ; RPC [MAGGDESCCAT] Call to return Mag Descriptive Categories in array
- ; for listing in a list box.
- N I,K,CT,Y
- S I=0,CT=0
- I '$D(^MAG(2005.81)) D Q
- . S MAGRY(0)="0^ERROR Mag Descriptive Category File doesn't exist"
- F S I=$O(^MAG(2005.81,"B",I)) Q:I="" D
- . ;Next line adds ADMIN, CLIN 3rd piece of the data returned
- . S K=$O(^MAG(2005.81,"B",I,"")),CT=CT+1
- . S MAGRY(CT)=I_U_K_U_$P(^MAG(2005.81,K,0),U,2)
- S MAGRY(0)=CT_"^Categories on file"
- Q
- USERKEYS(MAGKEY) ; RPC [MAGGUSERKEYS]
- ; Call to return an array of IMAGING Security Keys
- D USERKEYS^MAGGTU31(.MAGKEY)
- Q
- MAIL(MAGRY,MAGFILE,MAGIEN) ;RPC [MAGG OFFLINE IMAGE ACCESSED]
- ; Called to log an Offline Image accessed.
- ; ^MAGQUEUE(2006.033,0) = OFFLINE IMAGES
- ; User must edit 2006.033 by hand to mark images as OFFLINE.
- ;
- N FILEREF,PLATTER,A
- S MAGRY="0^Error : logging access to Off-Line Image"
- N $ETRAP,$ESTACK S $ETRAP="D ERR^MAGGTERR"
- S FILEREF=$$UP^XLFSTR($P(MAGFILE,"\",$L(MAGFILE,"\")))
- S PLATTER=$O(^MAGQUEUE(2006.033,"B",FILEREF,""))
- S PLATTER=$P(^MAGQUEUE(2006.033,PLATTER,0),U,2)
- I MAGFILE[".ABS" Q
- N XMDUZ,XMSUB,XMTEXT,XMY
- S XMDUZ=$S($D(DUZ):DUZ,1:.5)
- S XMSUB="Offline Image Request"
- S XMTEXT="A("
- S A(1)="Patient : "_$P(^DPT($P($G(^MAG(2005,+MAGIEN,0)),U,7),0),U,1)
- S A(2)="FileName : "_MAGFILE_" "_MAGIEN
- S A(3)="Desc : "_$P($G(^MAG(2005,MAGIEN,2)),U,4)
- S A(4)="Procedure : "_$P($G(^MAG(2005,MAGIEN,0)),U,8)
- S A(5)="Platter : "_PLATTER
- S A(6)="User : "_$$GET1^DIQ(200,DUZ_",",.01)_"("_$G(DUZ)_")"
- S XMY("G.OFFLINE IMAGE TRACKERS")="" D ^XMD
- S MAGRY="1^Message sent : Offline Image Accessed"
- Q
- LOGERROR(MAGRY,TEXT) ;RPC [MAGG LOG ERROR TEXT]
- ; Call to stuff error information from Delphi app into the Session file.
- Q:($P($G(MAGJOB("VERSION")),".",1,2))<"3.0"
- D LOGERR^MAGGTERR("---- New Error ----")
- S I="" F S I=$O(TEXT(I)) Q:I="" D LOGERR^MAGGTERR(TEXT(I))
- S MAGRY="1^Error text saved to Session file"
- Q
- RSLVABS(MAGIEN,FILENAME) ;Resolve Abstract into the Default Bitmap
- ; Return the default bitmap, If the image file extension resolves into a default bitmap
- ; MAGIEN : Image internal entry number
- ; FILENAME : "" or Relative Path and Default Bitmap. ie ('.\BMP\magavi.bmp')
- N FTIEN,EXT ;
- S FILENAME=""
- I '$D(^MAG(2005.021)) Q ; IMAGE FILE TYPES doesn't exist on this system.
- S EXT=$P($P(^MAG(2005,MAGIEN,0),"^",2),".",2) ; image file extension JPG, TGA, etc.
- Q:EXT="" ;
- S FTIEN=$O(^MAG(2005.021,"B",EXT,""))
- Q:'FTIEN ; No extension in IMAGE FILE TYPES file.
- ; stop dependency on "c:\program files"
- I '+$P(^MAG(2005.021,FTIEN,0),"^",5) S FILENAME=".\BMP\"_$P(^MAG(2005.021,FTIEN,0),"^",4)
- ;out 151T6; I +$P(^MAG(2005.021,FTIEN,0),"^",5) S FILENAME=".\BMP\NOTEXIST.BMP"
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGGTU3 8642 printed Jan 18, 2025@03:04:33 Page 2
- MAGGTU3 ;WOIFO/GEK/SG/NST - Silent calls for Imaging ; 21 Jun, 2023@13:43:01
- +1 ;;3.0;IMAGING;**7,8,48,45,20,46,59,93,117,151,356**;Mar 19, 2002;Build 8
- +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
- IMAGEINF(MAGRY,IEN,NOCHK) ;RPC [MAGG IMAGE INFO] Call to return information for 1 image;
- +1 ; IEN = Image IEN ^MAG(2005,IEN
- +2 ; NOCHK = 1|"" if 1 then do not run QA check on this image.
- +3 ;
- +4 NEW ERR,MAGFILE,Y,Z,MAGNOCHK
- +5 ;--- Check if the image is deleted
- +6 IF $$ISDEL^MAGGI11(IEN,.ERR)
- Begin DoDot:1
- +7 SET Y=$$NODE^MAGGI11(IEN)
- if Y'=""
- SET Y=$GET(@Y@(2))
- +8 SET MAGRY(0)="0^Image : """_$PIECE(Y,U,4)_""" has been deleted."
- +9 QUIT
- End DoDot:1
- QUIT
- +10 ;--- Check for errors. Ignore the problem if there are 2 records
- +11 ; with the same IEN in files #2005 and #2005.1. After the file
- +12 ;--- #2005.1 is completeley eliminated, ",+ERR'=-43" can be deleted.
- +13 IF ERR<0
- IF +ERR'=-43
- SET MAGRY(0)="0^INVALID Image number "_IEN
- QUIT
- +14 ;--- MAGGTII queries the variable MAGNOCHK to run QA check or not.
- +15 SET MAGNOCHK=+$GET(NOCHK)
- +16 SET MAGFILE=$$INFO^MAGGAII(IEN,"E")
- +17 SET Z=$PIECE(^MAG(2005,IEN,0),U,7)
- +18 IF '$DATA(^DPT(Z))
- SET Z="1^Invalid patient pointer"
- +19 IF '$TEST
- SET Z=Z_U_$PIECE(^DPT(Z,0),U)
- +20 SET MAGRY(0)="1^"_MAGFILE
- +21 ; dfn^name
- SET MAGRY(1)=Z
- +22 QUIT
- USERINF2(MAGRY,MAGWRKID) ;RPC [MAGGUSER2] Return user info.
- +1 ; MAGRY(1) = DUZ ^ FULL NAME ^ INITIALS
- +2 ; MAGRY(2) = Network UserName ^ PassWord.
- +3 ; MAGRY(3) = MUSE Site number. ( default = 1)
- +4 ; Node 4 is data from IMAGING SITE PARAMATERS File #2006.1 and INSTITUTION File #4
- +5 ; MAGRY(4)= PLACE IEN ^ SITE CODE ^ DUZ(2) ^ INSTITUTION NAME (.01) ^ $$CONSOLID ^ User's local STATION NUMBER (99)
- +6 ; MAGRY(5) = +<CP Version>|0 ^ Version of CP installed on Server
- +7 ; MAGRY(6) = Warning message if we can't resolve which Site Parameter entry to use.
- +8 ; MAGRY(7) = Warning message <reserved for future>
- +9 ; MAGRY(8) = 1|0 1 = Production account 0 = Test Account (or couldn't determine) ;Patch 41
- +10 ; MAGRY(9) = Vista Site Service PHYSICAL REFERENCE from Network Location File.
- +11 ; MAGRY(10)=Domain Name
- +12 ; MAGRY(11)=Primary Division IEN
- +13 ; MAGRY(12)=Primary Division STATION NUMBER
- +14 ; p151 Added 13 and 14
- +15 ; MAGRY(13)=Clinical Display User Manual URL
- +16 ; MAGRY(14)=Clinical Capture User Manual URL
- +17 ;
- +18 ; SEB 9/20/2002 - P356 CD 06/20/2023
- NEW J,K,Y,MAGPLC,MAGWARN,MAGWARN1,VSRV,PHYREF,X,XUSAPP,ISTELER
- +19 SET MAGPLC=0
- +20 ; DBI - SEB 9/20/2002
- IF $DATA(DUZ(2))
- SET MAGPLC=+$$PLACE^MAGBAPI(DUZ(2))
- +21 ;
- +22 ; SET THE PARTITION VARIABLE MAGSYS i.e.'IGK_Garrett's Desk'
- +23 SET MAGSYS=$GET(MAGWRKID,"")
- +24 IF +$GET(DUZ)=0
- SET MAGRY(0)="0^DUZ Undefined, Null or Zero"
- QUIT
- +25 IF 'MAGPLC
- Begin DoDot:1
- +26 SET MAGWARN="Can't resolve Site Param, DUZ(2): "_$SELECT($DATA(DUZ(2)):DUZ(2),1:"NULL")_" DUZ: "_DUZ
- +27 ; DBI - SEB 9/20/2002
- SET MAGPLC=$$DUZ2PLC^MAGBAPIP(.MAGWARN1)
- +28 QUIT
- End DoDot:1
- +29 SET MAGRY(0)="1^"
- +30 ; DUZ FULL NAME INITIALS
- +31 SET MAGRY(1)=DUZ_U_$$GET1^DIQ(200,DUZ_",",.01)_U_$$GET1^DIQ(200,DUZ_",",1)
- +32 ; NOW NET STUFF
- +33 IF 'MAGPLC
- QUIT
- +34 ; From IMAGING SITE PARAMETERS File
- +35 ; get the Network UserName and PassWord.
- +36 SET MAGRY(2)=$PIECE($GET(^MAG(2006.1,MAGPLC,"NET")),U,1,2)
- +37 ; get the default MUSE Site number.
- +38 SET MAGRY(3)=+$PIECE($GET(^MAG(2006.1,MAGPLC,"USERPREF")),U,2)
- +39 ; default to 1 if nothing is entered in Site Parameters File
- +40 IF MAGRY(3)=0
- SET MAGRY(3)=1
- +41 ; This SITEIEN^SITECODE^USER INSTITUTION IEN^INSTITUTION NAME^CONSOLIDATED^User's local STATION NUMBER
- +42 ; is used by Display to determine location of Workstation
- +43 ; and used by Capture to determine the Write Location.
- +44 SET MAGRY(4)=MAGPLC_U_$$GET1^DIQ(2006.1,MAGPLC,.09)_U_$GET(DUZ(2))_U_$$GET1^DIQ(2006.1,MAGPLC,.01,"E")
- +45 SET MAGJOB("PLC")=MAGPLC
- +46 SET MAGJOB("PLCODE")=$$GET1^DIQ(2006.1,MAGPLC,.09)
- +47 SET MAGRY(4)=MAGRY(4)_U_$$CONSOLID^MAGBAPI_U_$$GET1^DIQ(4,DUZ(2),99,"E")
- +48 ; is CP not installed at this site, the Client will hide options
- +49 ; related to CP.
- +50 SET X=$$VERSION^XPDUTL("CLINICAL PROCEDURES")
- +51 SET MAGRY(5)=+X_U_X
- +52 SET MAGRY(6)=$GET(MAGWARN)
- +53 SET MAGRY(7)=$GET(MAGWARN1)
- +54 SET MAGRY(8)=$SELECT($LENGTH($TEXT(PROD^XUPROD)):+$$PROD^XUPROD,1:0)
- +55 SET VSRV=$PIECE($GET(^MAG(2006.1,MAGPLC,"NET")),"^",5)
- +56 IF VSRV
- IF +$PIECE($GET(^MAG(2005.2,VSRV,0)),"^",6)
- SET PHYREF=$PIECE($GET(^MAG(2005.2,VSRV,0)),"^",2)
- +57 ; Start Site Service URL (9) for TeleReader Client, otherwise PHYREF - P356 CD 06/21/2023
- +58 SET XUSAPP=$PIECE($GET(DUZ("REMAPP")),U,2)
- +59 if XUSAPP'=""
- SET ^TMP($JOB,"MAGTELER")=0
- +60 SET ISTELER=$SELECT(XUSAPP="VISTA IMAGING TELEREADER":1,$GET(^TMP($JOB,"MAGTELER")):1,1:0)
- +61 SET MAGRY(9)=$SELECT(ISTELER:$$GET^XPAR("SYS","MAG TELER SSERV URL",1,"Q"),1:$GET(PHYREF))
- +62 ; Kill TeleReader Boolean set in MAGGTU4 - P356 CD 06/21/2023
- KILL ^TMP($JOB,"MAGTELER")
- +63 ; End of Site Service URL (9) setting with custom TeleReader handling - P356 CD 06/21/2023
- +64 SET MAGRY(10)=$$KSP^XUPARAM("WHERE")
- +65 SET MAGRY(11)=$PIECE($$SITE^VASITE(),"^")
- +66 SET MAGRY(12)=$PIECE($$SITE^VASITE(),"^",3)
- +67 ; p151
- SET MAGRY(13)=$PIECE($GET(^MAG(2006.1,MAGPLC,"HELPD")),"^",1)
- +68 ; p151
- SET MAGRY(14)=$PIECE($GET(^MAG(2006.1,MAGPLC,"HELPC")),"^",1)
- +69 QUIT
- +70 ;
- CATEGORY(MAGRY) ; RPC [MAGGDESCCAT] Call to return Mag Descriptive Categories in array
- +1 ; for listing in a list box.
- +2 NEW I,K,CT,Y
- +3 SET I=0
- SET CT=0
- +4 IF '$DATA(^MAG(2005.81))
- Begin DoDot:1
- +5 SET MAGRY(0)="0^ERROR Mag Descriptive Category File doesn't exist"
- End DoDot:1
- QUIT
- +6 FOR
- SET I=$ORDER(^MAG(2005.81,"B",I))
- if I=""
- QUIT
- Begin DoDot:1
- +7 ;Next line adds ADMIN, CLIN 3rd piece of the data returned
- +8 SET K=$ORDER(^MAG(2005.81,"B",I,""))
- SET CT=CT+1
- +9 SET MAGRY(CT)=I_U_K_U_$PIECE(^MAG(2005.81,K,0),U,2)
- End DoDot:1
- +10 SET MAGRY(0)=CT_"^Categories on file"
- +11 QUIT
- USERKEYS(MAGKEY) ; RPC [MAGGUSERKEYS]
- +1 ; Call to return an array of IMAGING Security Keys
- +2 DO USERKEYS^MAGGTU31(.MAGKEY)
- +3 QUIT
- MAIL(MAGRY,MAGFILE,MAGIEN) ;RPC [MAGG OFFLINE IMAGE ACCESSED]
- +1 ; Called to log an Offline Image accessed.
- +2 ; ^MAGQUEUE(2006.033,0) = OFFLINE IMAGES
- +3 ; User must edit 2006.033 by hand to mark images as OFFLINE.
- +4 ;
- +5 NEW FILEREF,PLATTER,A
- +6 SET MAGRY="0^Error : logging access to Off-Line Image"
- +7 NEW $ETRAP,$ESTACK
- SET $ETRAP="D ERR^MAGGTERR"
- +8 SET FILEREF=$$UP^XLFSTR($PIECE(MAGFILE,"\",$LENGTH(MAGFILE,"\")))
- +9 SET PLATTER=$ORDER(^MAGQUEUE(2006.033,"B",FILEREF,""))
- +10 SET PLATTER=$PIECE(^MAGQUEUE(2006.033,PLATTER,0),U,2)
- +11 IF MAGFILE[".ABS"
- QUIT
- +12 NEW XMDUZ,XMSUB,XMTEXT,XMY
- +13 SET XMDUZ=$SELECT($DATA(DUZ):DUZ,1:.5)
- +14 SET XMSUB="Offline Image Request"
- +15 SET XMTEXT="A("
- +16 SET A(1)="Patient : "_$PIECE(^DPT($PIECE($GET(^MAG(2005,+MAGIEN,0)),U,7),0),U,1)
- +17 SET A(2)="FileName : "_MAGFILE_" "_MAGIEN
- +18 SET A(3)="Desc : "_$PIECE($GET(^MAG(2005,MAGIEN,2)),U,4)
- +19 SET A(4)="Procedure : "_$PIECE($GET(^MAG(2005,MAGIEN,0)),U,8)
- +20 SET A(5)="Platter : "_PLATTER
- +21 SET A(6)="User : "_$$GET1^DIQ(200,DUZ_",",.01)_"("_$GET(DUZ)_")"
- +22 SET XMY("G.OFFLINE IMAGE TRACKERS")=""
- DO ^XMD
- +23 SET MAGRY="1^Message sent : Offline Image Accessed"
- +24 QUIT
- LOGERROR(MAGRY,TEXT) ;RPC [MAGG LOG ERROR TEXT]
- +1 ; Call to stuff error information from Delphi app into the Session file.
- +2 if ($PIECE($GET(MAGJOB("VERSION")),".",1,2))<"3.0"
- QUIT
- +3 DO LOGERR^MAGGTERR("---- New Error ----")
- +4 SET I=""
- FOR
- SET I=$ORDER(TEXT(I))
- if I=""
- QUIT
- DO LOGERR^MAGGTERR(TEXT(I))
- +5 SET MAGRY="1^Error text saved to Session file"
- +6 QUIT
- RSLVABS(MAGIEN,FILENAME) ;Resolve Abstract into the Default Bitmap
- +1 ; Return the default bitmap, If the image file extension resolves into a default bitmap
- +2 ; MAGIEN : Image internal entry number
- +3 ; FILENAME : "" or Relative Path and Default Bitmap. ie ('.\BMP\magavi.bmp')
- +4 ;
- NEW FTIEN,EXT
- +5 SET FILENAME=""
- +6 ; IMAGE FILE TYPES doesn't exist on this system.
- IF '$DATA(^MAG(2005.021))
- QUIT
- +7 ; image file extension JPG, TGA, etc.
- SET EXT=$PIECE($PIECE(^MAG(2005,MAGIEN,0),"^",2),".",2)
- +8 ;
- if EXT=""
- QUIT
- +9 SET FTIEN=$ORDER(^MAG(2005.021,"B",EXT,""))
- +10 ; No extension in IMAGE FILE TYPES file.
- if 'FTIEN
- QUIT
- +11 ; stop dependency on "c:\program files"
- +12 IF '+$PIECE(^MAG(2005.021,FTIEN,0),"^",5)
- SET FILENAME=".\BMP\"_$PIECE(^MAG(2005.021,FTIEN,0),"^",4)
- +13 ;out 151T6; I +$P(^MAG(2005.021,FTIEN,0),"^",5) S FILENAME=".\BMP\NOTEXIST.BMP"
- +14 QUIT