MAGSPID ;WOIFO/SF,JSL,DAC - PATIENT DATA UTILITIES ; 07 Jun 2012 12:00 PM
;;3.0;IMAGING;**122,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
; This routine is used on both VistA and the DICOM Gateway
PIDLABEL() ;
Q $S($$ISIHS():"HRN",1:"SSN")
;
DEM(LOC) ;For IHS, call DEM^VADPT but reset DUZ(2) to the instrument division
;this is because in IHS, patients have different chart numbers in each division
;this procedure can only be called on VistA or RPMs. It cannot be called on a DICOM GW
I $G(LOC)="" S LOC=DUZ(2)
S TMPDUZ2=DUZ(2),DUZ(2)=LOC
D DEM^VADPT ; Supported IA (#10061)
S DUZ(2)=TMPDUZ2 K TMPDUZ2
Q
;
ISIHS() ;Is this IHS site? (P123)
; This function is used on both VistA and the DICOM gateway
; In VistA DUZ("AG") will be used to determine if a site is an IHS site
; On the DICOM gateway the DICOM GATEWAY PARAMETER (#2006.563) file will be checked
Q $S($G(DUZ("AG"))="I":1,$G(^MAGDICOM(2006.563,1,"AGENCY"))="I":1,1:0)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGSPID 1965 printed Apr 07, 2021@15:10:56 Page 2
MAGSPID ;WOIFO/SF,JSL,DAC - PATIENT DATA UTILITIES ; 07 Jun 2012 12:00 PM
+1 ;;3.0;IMAGING;**122,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
+18 ; This routine is used on both VistA and the DICOM Gateway
PIDLABEL() ;
+1 QUIT $SELECT($$ISIHS():"HRN",1:"SSN")
+2 ;
DEM(LOC) ;For IHS, call DEM^VADPT but reset DUZ(2) to the instrument division
+1 ;this is because in IHS, patients have different chart numbers in each division
+2 ;this procedure can only be called on VistA or RPMs. It cannot be called on a DICOM GW
+3 IF $GET(LOC)=""
SET LOC=DUZ(2)
+4 SET TMPDUZ2=DUZ(2)
SET DUZ(2)=LOC
+5 ; Supported IA (#10061)
DO DEM^VADPT
+6 SET DUZ(2)=TMPDUZ2
KILL TMPDUZ2
+7 QUIT
+8 ;
ISIHS() ;Is this IHS site? (P123)
+1 ; This function is used on both VistA and the DICOM gateway
+2 ; In VistA DUZ("AG") will be used to determine if a site is an IHS site
+3 ; On the DICOM gateway the DICOM GATEWAY PARAMETER (#2006.563) file will be checked
+4 QUIT $SELECT($GET(DUZ("AG"))="I":1,$GET(^MAGDICOM(2006.563,1,"AGENCY"))="I":1,1:0)