Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/IMAGING-MAG-ZMAG/MAGGTII.m

    r628 r636  
    11MAGGTII ;WOIFO/GEK - RETURN IMAGE INFO ; [ 11/08/2001 17:18 ]
    2  ;;3.0;IMAGING;**8,48,63,59**;Nov 27, 2007;Build 20
    3  ;;Per VHA Directive 2004-038, this routine should not be modified.
     2 ;;3.0;IMAGING;**8,48,63**;Apr 11, 2005
    43 ;; +---------------------------------------------------------------+
    54 ;; | Property of the US Government.                                |
     
    98 ;; | Development Office of the Department of Veterans Affairs,     |
    109 ;; | telephone (301) 734-0100.                                     |
     10 ;; |                                                               |
    1111 ;; | The Food and Drug Administration classifies this software as  |
    1212 ;; | a medical device.  As such, it may not be changed in any way. |
     
    4040 ; $P(19^20)   Patient DFN  ^ Patient Name; // Patch 3.8
    4141 ; $P(21)          Image Class: Clin,Admin,Clin/Admin,Admin/Clin
    42  ; $p(22)      Date Time Image Saved(FLD 7)
    43  ; $p(23)      Document Date    (FLD 110)
    4442 ;
    4543 N FILETYPE,MAGPREF,MAGJBCP,GRPTYPE,GRPIEN,ABSTYPE,MAGTYPE,MAGJBOL
    4644 N MAGOFFLN,FULLTYPE,MAGOBJT,MAGQI,X
    4745 N ABSFILE,FULLFILE,BIGFILE,PATCH,MDFN,FNL,PLC,PLCODE
    48  N MAGN0,MAGN2,MAGN40,MAGN100
     46 N MAGN0,MAGN2,MAGN40
    4947 ;    set the Variables for the Global Nodes of the Image Entry
    50  S MAGN0=$G(^MAG(2005,MAGXX,0))
    51  S MDFN=$P(MAGN0,"^",7)
     48 S MAGN0=$G(^MAG(2005,MAGXX,0)),MDFN=$P(MAGN0,"^",7) ; P48T1 MDFN
    5249 S MAGN2=$G(^MAG(2005,MAGXX,2))
    5350 S MAGN40=$G(^MAG(2005,MAGXX,40))
    54  S MAGN100=$G(^MAG(2005,MAGXX,100))
    55  ; Set Name in Variable, Call $$GET 1 time not 2000
    56  I MDFN I '$D(MAGJOB("PTNM",MDFN)) S MAGJOB("PTNM",MDFN)=$$GET1^DIQ(2,MDFN_",",.01)
     51 ; P48T1 Set Name in Variable, Call $$GET 1 time not 2000
     52 I '$D(MAGJOB("PTNM",MDFN)) S MAGJOB("PTNM",MDFN)=$$GET1^DIQ(2,MDFN_",",.01)
    5753 I '$D(MAGJOB("NETPLC")) D NETPLCS^MAGGTU6
    5854 ;  Object Type
     
    119115 S PLC=$P($G(MAGJOB("NETPLC",FNL)),"^",1)
    120116 S PLCODE=$P($G(MAGJOB("NETPLC",FNL)),"^",2)
    121  I PLC="" S PLC=$G(MAGJOB("PLC")),PLCODE=$G(MAGJOB("PLCODE")) ; Group of 0 need this.
    122117 ;   if we were using first image of a group, reset the Real IEN
    123118 I $G(GRPIEN) S MAGXX=GRPIEN
     
    135130 K MAGFILE
    136131 S $P(MAGFILE,U,25)="" ; We put extra '^^^' on end of String to stop error in Delphi.
    137  ; Pieces 26 BrokerServer and 27 Broker Port are set if this is P59 Client.
    138  ; Clients Prior to Patch 59, the String must only be 25 pieces. - Patch 45 snafu
    139  ;
     132 ;
    140133 ; $P(1^2^3) IEN^Image FullPath and name^Abstract FullPath and Name
    141134 S $P(MAGFILE,U,1,3)=MAGXX_U_FULLFILE_U_ABSFILE
     135 S $P(MAGFILE,U,18)=BIGFILE
    142136 ;
    143137 ; now set $P(4) SHORT DESCRIPTION field and desc of offline JukeBox
     
    156150 ;  the delphi TStringGrid so we display mm/dd/yyyy
    157151 ; now set $P(8) display date
    158  S X=$$FMTE^XLFDT($P(MAGN2,U,5),"5Z")
    159  S X=$TR(X,"@"," ")
     152 S X=$P($P(MAGN2,"^",5),".",1)
     153 I X'="" S X=$E(X,4,5)_"/"_$E(X,6,7)_"/"_($E(X,1,3)+1700)
    160154 S $P(MAGFILE,U,8)=X
    161155 ;
     
    174168 ;    $p(12) and $p(13)
    175169 ;
    176  ; 14 - count of images , if this is a group
     170 ; lets add the count of images , if this is a group
    177171 S X=+$P($G(^MAG(2005,MAGXX,1,0)),U,4),$P(MAGFILE,U,14)=$S(X:X,1:1)
    178172 ;
     
    191185 . ;Send the error message
    192186 . S $P(MAGFILE,U,17)=$P(MAGQI(0),U,2)
    193  ; $p(18) is BIGFile Full name and path.
    194  S $P(MAGFILE,U,18)=BIGFILE
    195  ; DFN
    196  S $P(MAGFILE,U,19)=$P(MAGN0,U,7)
    197  ; Patient Name
    198  S $P(MAGFILE,U,20)=$S(MDFN:MAGJOB("PTNM",MDFN),1:MDFN)
     187 ; $p(18) is BIGFile Full name and path. ( set above)
     188 ; Patches prior to 8, only had 17 pieces of data. this will speed up their listings.
     189 ; Patch 8 had New M rtn MAGSIXG1, if it doesn't exist, this is PRE - 8.
     190 I '$L($T(PGI^MAGSIXG1)) Q
     191 S $P(MAGFILE,U,19)=$P(MAGN0,U,7)                         ; DFN
     192 ; P48T1 The change to speed up access to large groups left out patient name.
     193 ;S $P(MAGFILE,U,20)=$$GET1^DIQ(2,$P(MAGN0,U,7)_",",.01)   ; Patient Name
     194 S $P(MAGFILE,U,20)=MAGJOB("PTNM",MDFN)
    199195 S $P(MAGFILE,U,21)=$S(+$P(MAGN40,U,2):$P(^MAG(2005.82,$P(MAGN40,U,2),0),U),1:"")
    200  S X=$$FMTE^XLFDT($P(MAGN2,U,1),"5Z") ; Date/Time Image Saved  #7
    201  S X=$TR(X,"@"," ")
    202  S $P(MAGFILE,U,22)=X
    203  S X=$$FMTE^XLFDT($P(MAGN100,U,6),"5Z")   ; DocumentDate #110
    204  S X=$TR(X,"@"," ")
    205  S $P(MAGFILE,U,23)=X
    206  ; If Patch 59 Client - we can set beyond 25 pieces.
    207  I $D(MAGJOB("RPCSERVER"))&$D(MAGJOB("RPCPORT")) D
    208  . S $P(MAGFILE,U,26)=MAGJOB("RPCSERVER")
    209  . S $P(MAGFILE,U,27)=MAGJOB("RPCPORT")
    210  . S $P(MAGFILE,U,28)="" ; "^" at end, stops problems in delphi
    211  . Q
    212196 ; Stop displaying a Group of 1 as a Group, so here we'll change Object type
    213197 ;  to that of the '1ST' image in the group of 1.
     
    217201 . S $P(MAGFILE,U,6)=$P(^MAG(2005,X,0),U,6) ; OBJECT TYPE OF 1ST IMAGE IN GROUP
    218202 . S $P(MAGFILE,U,1)=X
    219  . Q
     203 . ; Need Site and Site code of
    220204 Q
Note: See TracChangeset for help on using the changeset viewer.