- MAGVRS14 ;WOIFO/DAC,MLH - RPC calls for DICOM file processing ; 26 Jan 2012 11:01 PM
- ;;3.0;IMAGING;**118**;Mar 19, 2002;Build 4525;May 01, 2013
- ;; 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
- GETSER(OUT,STUDYIEN,SERIEN,OVERRIDE) ;RPC - MAGV GET SERIES
- D REFRESH^MAGVRS41(.OUT,2005.63,$G(SERIEN),$G(STUDYIEN),$G(OVERRIDE))
- Q
- INSERIES(OUT,SERIEN,STUDYIEN,OVERRIDE) ; RPC - MAGV INACTIVATE SERIES
- D INACTIVT^MAGVRS41(.OUT,2005.63,$G(SERIEN),$G(STUDYIEN),$G(OVERRIDE))
- Q
- FINDBYRF(OUT,REFUID) ; RPC - MAGV FIND SERIES BY UID
- ; Looks up for Series by Reference UID only.
- ; Returns null if no such Series found, else returns one or a list of Series Handles. Note: one Reference UID can point to multiple series.
- ; Generates exception on invalid input.
- ;
- ; Find reference IEN based on UID
- ; Look for IEN in Series
- N FILENO,I,IEN,STATUS,FIELD,OSEP,ISEP,SSEP
- S FILENO=2005.63
- S OSEP=$$OUTSEP^MAGVRS41,ISEP=$$INPUTSEP^MAGVRS41,SSEP=$$STATSEP^MAGVRS41
- I $G(REFUID)="" S OUT(1)="-2"_SSEP_"UID has no value" Q
- S I=1,IEN=""
- F D Q:IEN="" S I=I+1
- . S IEN=$O(^MAGV(FILENO,"B",REFUID,IEN))
- . Q:'IEN
- . S FIELD=$$GETFIELD^MAGVRS41(FILENO,"STATUS")
- . S STATUS=$$GET1^DIQ(FILENO,IEN,FIELD,"I")
- . I IEN'="",STATUS'="I" S OUT(I)="0"_SSEP_SSEP_IEN
- . Q
- I $G(OUT(1))="" S OUT(1)="-1"_SSEP_"Series reference UID not found"
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGVRS14 2307 printed Feb 18, 2025@23:36:41 Page 2
- MAGVRS14 ;WOIFO/DAC,MLH - RPC calls for DICOM file processing ; 26 Jan 2012 11:01 PM
- +1 ;;3.0;IMAGING;**118**;Mar 19, 2002;Build 4525;May 01, 2013
- +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
- GETSER(OUT,STUDYIEN,SERIEN,OVERRIDE) ;RPC - MAGV GET SERIES
- +1 DO REFRESH^MAGVRS41(.OUT,2005.63,$GET(SERIEN),$GET(STUDYIEN),$GET(OVERRIDE))
- +2 QUIT
- INSERIES(OUT,SERIEN,STUDYIEN,OVERRIDE) ; RPC - MAGV INACTIVATE SERIES
- +1 DO INACTIVT^MAGVRS41(.OUT,2005.63,$GET(SERIEN),$GET(STUDYIEN),$GET(OVERRIDE))
- +2 QUIT
- FINDBYRF(OUT,REFUID) ; RPC - MAGV FIND SERIES BY UID
- +1 ; Looks up for Series by Reference UID only.
- +2 ; Returns null if no such Series found, else returns one or a list of Series Handles. Note: one Reference UID can point to multiple series.
- +3 ; Generates exception on invalid input.
- +4 ;
- +5 ; Find reference IEN based on UID
- +6 ; Look for IEN in Series
- +7 NEW FILENO,I,IEN,STATUS,FIELD,OSEP,ISEP,SSEP
- +8 SET FILENO=2005.63
- +9 SET OSEP=$$OUTSEP^MAGVRS41
- SET ISEP=$$INPUTSEP^MAGVRS41
- SET SSEP=$$STATSEP^MAGVRS41
- +10 IF $GET(REFUID)=""
- SET OUT(1)="-2"_SSEP_"UID has no value"
- QUIT
- +11 SET I=1
- SET IEN=""
- +12 FOR
- Begin DoDot:1
- +13 SET IEN=$ORDER(^MAGV(FILENO,"B",REFUID,IEN))
- +14 if 'IEN
- QUIT
- +15 SET FIELD=$$GETFIELD^MAGVRS41(FILENO,"STATUS")
- +16 SET STATUS=$$GET1^DIQ(FILENO,IEN,FIELD,"I")
- +17 IF IEN'=""
- IF STATUS'="I"
- SET OUT(I)="0"_SSEP_SSEP_IEN
- +18 QUIT
- End DoDot:1
- if IEN=""
- QUIT
- SET I=I+1
- +19 IF $GET(OUT(1))=""
- SET OUT(1)="-1"_SSEP_"Series reference UID not found"
- +20 QUIT