Ignore:
Timestamp:
Dec 4, 2009, 12:11:15 AM (14 years ago)
Author:
George Lilly
Message:

revised back to 6/30/08 version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGGTSR1.m

    r613 r623  
    1 MAGGTSR1        ;WOIFO/GEK - ADD IMAGES TO SURGERY FILE ; [ 06/20/2001 08:57 ]
    2         ;;3.0;IMAGING;**59**;Nov 27, 2007;Build 20
    3         ;;Per VHA Directive 2004-038, this routine should not be modified.
    4         ;; +---------------------------------------------------------------+
    5         ;; | Property of the US Government.                                |
    6         ;; | No permission to copy or redistribute this software is given. |
    7         ;; | Use of unreleased versions of this software requires the user |
    8         ;; | to execute a written test agreement with the VistA Imaging    |
    9         ;; | Development Office of the Department of Veterans Affairs,     |
    10         ;; | telephone (301) 734-0100.                                     |
    11         ;; |                                                               |
    12         ;; | The Food and Drug Administration classifies this software as  |
    13         ;; | a medical device.  As such, it may not be changed in any way. |
    14         ;; | Modifications to this software may result in an adulterated   |
    15         ;; | medical device under 21CFR820, the use of which is considered |
    16         ;; | to be a violation of US Federal Statutes.                     |
    17         ;; +---------------------------------------------------------------+
    18         ;;
    19         Q
    20 FILE(MAGRY,MAGIEN,DATA) ;RPC Call to file Image pointers in Surgery package
    21         ;   and Surgery pointers in Image File.
    22         ;
    23         ; DATA is same data that we listed in the GET^MAGGTSR call
    24         ; MAGIEN is the Imaging internal number.
    25         ;  example
    26         ; for Imaging Versions < 2.5 the data is
    27         ; #     DATE             DESC      SRF(IEN   FM DATE
    28         ;CNT_U_(READABLE DATE)_U_SROPS(1)_U_SROP_U_SRSDATE
    29         ;
    30         ; for Imaging Versions > 2.4, the data is different
    31         ;CNT_U_(READABLE DATE)_U_SROPS(1)_U_IMAGECT_U_"|"_SROP_U_SRSDATE
    32         ;  example
    33         ;  1^05-06-1997^REMOVE TONSILS (REQUESTED)^8^|9853^2970506^
    34         ;
    35         IF $$NEWERR^%ZTER N $ETRAP,$ESTACK S $ETRAP="D ERR^MAGGTERR"
    36         E  S X="ERR^MAGGTERR",@^%ZOSF("TRAP")
    37         N Y,MAGSIEN,MAGPDT,MAGFDA,MAGERR,MAGIENS
    38         ;
    39         I (+$G(MAGJOB("VERSION"))>2.4) D
    40         . S MAGSIEN=$P($P(DATA,$C(124),2),U,1)
    41         . S MAGPDT=$P($P(DATA,$C(124),2),U,2)
    42         E  S MAGSIEN=$P(DATA,U,4),MAGPDT=$P(DATA,U,5)
    43         S MAGFDA(130.02005,"+1,"_MAGSIEN_",",.01)=MAGIEN
    44         D UPDATE^DIE("S","MAGFDA","MAGIENS","MAGERR")
    45         I '$G(MAGIENS(1)) D  D CLEAN^DILF S MAGRY=MAGERR Q
    46         . S MAGERR="0^ERROR Adding Image to Surgery Package "
    47         . I $D(DIERR) D RTRNERR(.MAGERR)
    48         S MAGRY="1^Image added to Surgery Package"
    49         S $P(^MAG(2005,MAGIEN,2),U,6,8)="130^"_MAGSIEN_U_MAGIENS(1)
    50         D LINKDT^MAGGTU6(.X,MAGIEN)
    51         Q
    52 RTRNERR(ETXT)   ; There was error from UPDATE^DIE quit with error text
    53         S ETXT="0^ERROR  "_MAGERR("DIERR",1,"TEXT",1)
    54         Q
     1MAGGTSR1 ;WOIFO/GEK - ADD IMAGES TO SURGERY FILE ; [ 06/20/2001 08:57 ]
     2 ;;3.0;IMAGING;;Mar 01, 2002
     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 ;; |                                                               |
     11 ;; | The Food and Drug Administration classifies this software as  |
     12 ;; | a medical device.  As such, it may not be changed in any way. |
     13 ;; | Modifications to this software may result in an adulterated   |
     14 ;; | medical device under 21CFR820, the use of which is considered |
     15 ;; | to be a violation of US Federal Statutes.                     |
     16 ;; +---------------------------------------------------------------+
     17 ;;
     18 Q
     19FILE(MAGRY,MAGIEN,DATA) ;RPC Call to file Image pointers in Surgery package
     20 ;   and Surgery pointers in Image File.
     21 ;
     22 ; DATA is same data that we listed in the GET^MAGGTSR call
     23 ; MAGIEN is the Imaging internal number.
     24 ;  example
     25 ; for Imaging Versions < 2.5 the data is
     26 ; #     DATE             DESC      SRF(IEN   FM DATE
     27 ;CNT_U_(READABLE DATE)_U_SROPS(1)_U_SROP_U_SRSDATE
     28 ;
     29 ; for Imaging Versions > 2.4, the data is different
     30 ;CNT_U_(READABLE DATE)_U_SROPS(1)_U_IMAGECT_U_"|"_SROP_U_SRSDATE
     31 ;  example
     32 ;  1^05-06-1997^REMOVE TONSILS (REQUESTED)^8^|9853^2970506^
     33 ;
     34 IF $$NEWERR^%ZTER N $ETRAP,$ESTACK S $ETRAP="D ERR^MAGGTERR"
     35 E  S X="ERR^MAGGTERR",@^%ZOSF("TRAP")
     36 N Y,MAGSIEN,MAGPDT,MAGFDA,MAGERR,MAGIENS
     37 ;
     38 I (+$G(MAGJOB("VERSION"))>2.4) D
     39 . S MAGSIEN=$P($P(DATA,$C(124),2),U,1)
     40 . S MAGPDT=$P($P(DATA,$C(124),2),U,2)
     41 E  S MAGSIEN=$P(DATA,U,4),MAGPDT=$P(DATA,U,5)
     42 S MAGFDA(130.02005,"+1,"_MAGSIEN_",",.01)=MAGIEN
     43 D UPDATE^DIE("S","MAGFDA","MAGIENS","MAGERR")
     44 I '$G(MAGIENS(1)) D  D CLEAN^DILF S MAGRY=MAGERR Q
     45 . S MAGERR="0^ERROR Adding Image to Surgery Package "
     46 . I $D(DIERR) D RTRNERR(.MAGERR)
     47 S MAGRY="1^Image added to Surgery Package"
     48 S $P(^MAG(2005,MAGIEN,2),U,6,8)="130^"_MAGSIEN_U_MAGIENS(1)
     49 Q
     50RTRNERR(ETXT) ; There was error from UPDATE^DIE quit with error text
     51 S ETXT="0^ERROR  "_MAGERR("DIERR",1,"TEXT",1)
     52 Q
Note: See TracChangeset for help on using the changeset viewer.