Changeset 623 for WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGLOG.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGLOG.m
r613 r623 1 MAGLOG ;WOIFO/RED,SRR,MLH - Log image access ; [ 06/20/2001 08:57 ] 2 ;;3.0;IMAGING;**17,8,20,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 ; CALL WITH: 20 ; MAGIMT = TYPE OF ACCESS 21 ; DUZ = USER NO. 22 ; MAGO = IMAGE SUBSCRIPT NO. 23 ; MAGPACK = USER INTERFACE PACKAGE 24 ; MAGDFN = PATIENT NO. 25 ; MAGCT = TOTAL IMAGE COUNT 26 ; MAGAD = ADDITIONAL DATA 27 ENTRY(MAGIMT,MAGDUZ,MAGO,MAGPACK,MAGDFN,MAGCT,MAGAD) ; 28 I '$D(MAGSYS) S MAGSYS=^%ZOSF("VOL") 29 N MAGC,MSYS 30 S MSYS=$$UP^XLFSTR(MAGSYS) 31 I (MSYS["UNKNOWN"),($D(MAGJOB("WRKSIEN"))) S MSYS=$P(^MAG(2006.81,MAGJOB("WRKSIEN"),0),"^",1) 32 L +^MAG(2006.95,0):10 E Q ;entries were being overwritten. 33 S MAGC=$P(^MAG(2006.95,0),"^",3)+1 34 S $P(^MAG(2006.95,0),"^",3,4)=MAGC_"^"_MAGC 35 L -^MAG(2006.95,0) 36 D NOW^%DTC ;gives us % (now) 37 ; FLD #'s .01 1 2 3 4 5 6 7 8 9 38 S ^MAG(2006.95,MAGC,0)=MAGC_"^"_$G(MAGIMT)_"^"_$G(MAGDUZ)_"^"_MAGO_"^"_MAGPACK_"^"_MSYS_"^"_%_"^"_MAGDFN_"^"_MAGCT_"^"_+$G(MAGJOB("SESSION")) 39 I $D(MAGAD) S ^MAG(2006.95,MAGC,100)=MAGAD 40 S ^MAG(2006.95,"B",MAGC,MAGC)="" 41 D ACCESS(MAGO) ; This should be here. Can now search 2006.95 from "Last Access Date" to "Capture Date" to 42 ; get all Actions logged. We Don't have to search entire Image File. 43 I $G(MAGJOB("SESSION")) S ^MAG(2006.95,"AS",+$G(MAGJOB("SESSION")),MAGC)="" 44 Q 45 ACCESS(MAGO) ; Update Field "Last Access Date" in Image File. 46 Q:'$G(MAGO) 47 I '$D(^MAG(2005,MAGO,0)) D Q 48 . I $D(^MAG(2005.1,MAGO,0)) S $P(^MAG(2005.1,MAGO,0),"^",9)=$$NOW^XLFDT 49 . Q 50 S $P(^MAG(2005,MAGO,0),"^",9)=$$NOW^XLFDT 51 Q 1 MAGLOG ;WOIFO/RED,SRR,MLH - Log image access ; [ 06/20/2001 08:57 ] 2 ;;3.0;IMAGING;**17,8,20**;Apr 12, 2006 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 ; CALL WITH: 19 ; MAGIMT = TYPE OF ACCESS 20 ; DUZ = USER NO. 21 ; MAGO = IMAGE SUBSCRIPT NO. 22 ; MAGPACK = USER INTERFACE PACKAGE 23 ; MAGDFN = PATIENT NO. 24 ; MAGCT = TOTAL IMAGE COUNT 25 ; MAGAD = ADDITIONAL DATA 26 ENTRY(MAGIMT,MAGDUZ,MAGO,MAGPACK,MAGDFN,MAGCT,MAGAD) ; 27 I '$D(MAGSYS) S MAGSYS=^%ZOSF("VOL") 28 N MAGC,MSYS 29 S MSYS=$$UP^XLFSTR(MAGSYS) 30 I (MSYS["UNKNOWN"),($D(MAGJOB("WRKSIEN"))) S MSYS=$P(^MAG(2006.81,MAGJOB("WRKSIEN"),0),"^",1) 31 L +^MAG(2006.95,0):10 E Q ;entries were being overwritten. 32 S MAGC=$P(^MAG(2006.95,0),"^",3)+1 33 S $P(^MAG(2006.95,0),"^",3,4)=MAGC_"^"_MAGC 34 L -^MAG(2006.95,0) 35 D NOW^%DTC ;gives us % (now) 36 ; FLD #'s .01 1 2 3 4 5 6 7 8 9 37 S ^MAG(2006.95,MAGC,0)=MAGC_"^"_$G(MAGIMT)_"^"_$G(MAGDUZ)_"^"_MAGO_"^"_MAGPACK_"^"_MSYS_"^"_%_"^"_MAGDFN_"^"_MAGCT_"^"_+$G(MAGJOB("SESSION")) 38 I $D(MAGAD) S ^MAG(2006.95,MAGC,100)=MAGAD 39 S ^MAG(2006.95,"B",MAGC,MAGC)="" 40 I $G(MAGJOB("SESSION")) S ^MAG(2006.95,"AS",+$G(MAGJOB("SESSION")),MAGC)="" 41 Q 42 ACCESS(MAGO) ; Update Field "Last Access Date" in Image File. 43 I '$D(^MAG(2005,MAGO,0)) D Q 44 . I $D(^MAG(2005.1,MAGO,0)) S $P(^MAG(2005.1,MAGO,0),"^",9)=$$NOW^XLFDT 45 . Q 46 S $P(^MAG(2005,MAGO,0),"^",9)=$$NOW^XLFDT 47 Q
Note:
See TracChangeset
for help on using the changeset viewer.