MAGGA02A ;WOIFO/SG/NST - REMOTE PROCEDURES FOR IMAGE PROPERTIES ; 24 Sep 2010 8:23 AM
;;3.0;IMAGING;**93,117**;Mar 19, 2002;Build 2238;Jul 15, 2011
;; 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
;
IPDEFS ;+++++ DEFINITIONS OF PROPERTIES FOR IMAGE FILE (#2005)
;;==================================================================
;;| Parameter | File |Field|Type |Flags| Comment |
;;|------------+-------+-----+-----+-----+-------------------------|
;;|CAPTAPP |2005 | 8.1 | S | R | CAPTURE APPLICATION |
;;|CRTNDT |2005 | 110 | D | RW | CREATION DATE |
;;|DTSAVED |2005 | 7 | D | R | DATE/TIME IMAGE SAVED |
;;|GDESC |2005 | 10 | | RW | SHORT DESCRIPTION |
;;|IDFN |2005 | 5 | P | R | PATIENT |
;;|ISTAT |2005 |113 | S | RW | STATUS |
;;|ISTATBY |2005 |113.2| P | R | STATUS BY |
;;|ISTATDT |2005 |113.1| D | R | STATUS DATE |
;;|ISTATRSN |2005 |113.3| P | RW | STATUS REASON |
;;|IXCLASS | | | P | R | CLASS INDEX |
;;|IXORIGIN |2005 | 45 | S | RW | ORIGIN INDEX |
;;|IXPKG |2005 | 40 | S | RW | PACKAGE INDEX |
;;|IXPROC |2005 | 43 | P | RW | PROC/EVENT INDEX |
;;|IXSPEC |2005 | 44 | P | RW | SPEC/SUBSPEC INDEX |
;;|IXTYPE |2005 | 42 | P | RW | TYPE INDEX |
;;|LDESCR |2005 | 11 | W | R | LONG DESCRIPTION |
;;|OBJNAME |2005 | .01 | | R | OBJECT NAME |
;;|OBJTYPE |2005 | 3 | P | R | OBJECT TYPE |
;;|PARDF |2005 | 16 | P | RW | PARENT DATA FILE# |
;;|PARGRD0 |2005 | 17 | | RW | PARENT GLOBAL ROOT D0 |
;;|PARGRD1 |2005 | 63 | | RW | PARENT GLOBAL ROOT D1 |
;;|PARIPTR |2005 | 18 | | RW | PARENT...IMAGE POINTER |
;;|PROC |2005 | 6 | | RW | PROCEDURE |
;;|PROCDT |2005 | 15 | D | RW | PROCEDURE/EXAM DATE/TIME|
;;|SAVEDBY |2005 | 8 | P | R | IMAGE SAVE BY |
;;|SENSBY |2005 |112.2| P | R | CONTROLLED BY |
;;|SENSDT |2005 |112.1| D | R | CONTROLLED DATE |
;;|SENSIMG |2005 |112 | S | RW | CONTROLLED IMAGE |
;;==================================================================
;
; Custom Flags:
; R Image property can be read
; W Image property can be modified
;
Q
;
IPDEFS1 ;+++++ DEFINITIONS OF PROPERTIES FOR IMAGE AUDIT FILE (#2005.1)
;;==================================================================
;;| Parameter | File |Field|Type |Flags| Comment |
;;|------------+-------+-----+-----+-----+-------------------------|
;;|CAPTAPP |2005.1 | 8.1 | S | R | CAPTURE APPLICATION |
;;|CRTNDT |2005.1 | 110 | D | R | CREATION DATE |
;;|DTSAVED |2005.1 | 7 | D | R | DATE/TIME IMAGE SAVED |
;;|GDESC |2005.1 | 10 | | R | SHORT DESCRIPTION |
;;|IDFN |2005.1 | 5 | P | R | PATIENT |
;;|ISTAT |2005.1 |113 | S | R | STATUS |
;;|ISTATBY |2005.1 |113.2| P | R | STATUS BY |
;;|ISTATDT |2005.1 |113.1| D | R | STATUS DATE |
;;|ISTATRSN |2005.1 |113.3| P | R | STATUS REASON |
;;|IXCLASS | | | P | R | CLASS INDEX |
;;|IXORIGIN |2005.1 | 45 | S | R | ORIGIN INDEX |
;;|IXPKG |2005.1 | 40 | S | R | PACKAGE INDEX |
;;|IXPROC |2005.1 | 43 | P | R | PROC/EVENT INDEX |
;;|IXSPEC |2005.1 | 44 | P | R | SPEC/SUBSPEC INDEX |
;;|IXTYPE |2005.1 | 42 | P | R | TYPE INDEX |
;;|LDESCR |2005.1 | 11 | W | R | LONG DESCRIPTION |
;;|OBJNAME |2005.1 | .01 | | R | OBJECT NAME |
;;|OBJTYPE |2005.1 | 3 | P | R | OBJECT TYPE |
;;|PARDF |2005.1 | 16 | P | R | PARENT DATA FILE# |
;;|PARGRD0 |2005.1 | 17 | | R | PARENT GLOBAL ROOT D0 |
;;|PARGRD1 |2005.1 | 63 | | R | PARENT GLOBAL ROOT D1 |
;;|PARIPTR |2005.1 | 18 | | R | PARENT...IMAGE POINTER |
;;|PROC |2005.1 | 6 | | R | PROCEDURE |
;;|PROCDT |2005.1 | 15 | D | R | PROCEDURE/EXAM DATE/TIME|
;;|SAVEDBY |2005.1 | 8 | P | R | IMAGE SAVE BY |
;;|SENSBY |2005.1 |112.2| P | R | CONTROLLED BY |
;;|SENSDT |2005.1 |112.1| D | R | CONTROLLED DATE |
;;|SENSIMG |2005.1 |112 | S | R | CONTROLLED IMAGE |
;;==================================================================
;
; Custom Flags:
; R Image property can be read
; W Image property can be modified
;
Q
;
;+++++ COMPUTES THE VALUE OF THE IMAGE CLASS PROPERTY
;
; IMGFILE Image file number
;
; IENS IENS of the image record
;
; TPIENS IEN or IENS of the Image Type record in the
; IMAGE INDEX FOR TYPES file (#2005.83). If this
; parameter is not greater than 0, then the IEN is
; loaded from the image record referenced by the
; IMGFILE and IENS parameters.
;
; FLAGS Flags that control the execution (can be combined):
;
; E Return external value
;
; I Return internal value
;
; Return Values
; =============
; <0 Error descriptor (see $$ERROR^MAGUERR)
; 0 Class value is not available
; ... Property record (for the result array)
;
; Notes
; =====
;
; This is an internal entry point. Do not call it from outside
; of the MAGGA02* routines.
;
IXCLASS(IMGFILE,IENS,TPIENS,FLAGS) ;
N MAGBUF1,MAGMSG,RC,TMP
S RC=0
;--- If the Type Index IEN is not provided,
;--- then get it form the image record
I TPIENS'>0 D Q:(RC<0)!(TPIENS'>0) RC
. S TPIENS=$$GET1^DIQ(IMGFILE,IENS,42,"I",,"MAGMSG")
. S:$G(DIERR) RC=$$DBS^MAGUERR("MAGMSG",IMGFILE,IENS)
. Q
S TPIENS=(+TPIENS)_","
;--- Load the Image Class value(s)
S TMP=$$TRFLAGS^MAGUTL05(FLAGS,"EI")
D GETS^DIQ(2005.83,TPIENS,1,TMP,"MAGBUF1","MAGMSG")
Q:$G(DIERR) $$DBS^MAGUERR("MAGMSG",2005.83,TPIENS)
;--- Store the property value(s) to the result array
S TMP="IXCLASS"_U
S:FLAGS["I" TMP=TMP_U_MAGBUF1(2005.83,TPIENS,1,"I")
S:FLAGS["E" TMP=TMP_U_MAGBUF1(2005.83,TPIENS,1,"E")
Q TMP
;
;+++++ REPLICATES THE CHANGES FOR A GROUP OF 1 IMAGE
;
; IMGIEN IEN of the image record in the IMAGE file (#2005)
;
; .MAGFDA FDA array with new data
;
; Return Values
; =============
; <0 Error descriptor (see the $$ERROR^MAGUERR)
; 0 Replication is not needed
; >0 IEN of the destination record for replication
;
REPLIC(IMGIEN,MAGFDA) ;
N CNT,FIELD,IENS,IENS1,IMGIEN1
;
;=== Check if the data replication is needed
S IMGIEN1=$$GRPIEN^MAGGI12(IMGIEN) Q:IMGIEN1<0 IMGIEN1
I IMGIEN1>0 D Q:CNT<0 CNT Q:+CNT'=1 0
. ;--- Check if the IMGIEN references the only "child" of a group
. S CNT=$$GRPCT^MAGGI14(IMGIEN1)
. Q
E D Q:IMGIEN1'>0 IMGIEN1
. ;--- Check if the IMGIEN references a group of 1 child
. S CNT=$$GRPCT^MAGGI14(IMGIEN)
. I CNT<0 S IMGIEN1=CNT Q
. S IMGIEN1=$S(+CNT=1:$$GRPCH1^MAGGI14(IMGIEN,"E"),1:0)
. Q
;
;=== Prepare the data for replication
S IENS=IMGIEN_",",IENS1=IMGIEN1_","
F FIELD=10,42,43,44,45,110,112,113,113.3 D
. Q:'$D(MAGFDA(2005,IENS,FIELD))
. S MAGFDA(2005,IENS1,FIELD)=MAGFDA(2005,IENS,FIELD)
. Q
;---
Q IMGIEN1
;
;+++++ Change the STATUS of the first image in the Group
;
; IMGIEN IEN of the image record in the IMAGE file (#2005)
;
; .MAGFDA FDA array with new data
;
; Return Values
; =============
; <0 Error descriptor (see the $$ERROR^MAGUERR)
; 0 Modification is not needed
; >0 IEN of the first child
;
STATUS1(IMGIEN,MAGFDA) ;
N IMGIEN1,IENS,IENS1,FOUND,FIELD
S IENS=IMGIEN_","
S FOUND=0
; 113 STATUS, 113.3 STATUS REASON
F FIELD=113,113.3 I $D(MAGFDA(2005,IENS,FIELD)) S FOUND=1 Q
Q:'FOUND 0 ; A field is not in the array
S IMGIEN1=$$GRPCH1^MAGGI14(IMGIEN,"E") ; First child in the group
I IMGIEN1'>0 Q IMGIEN1
;
;=== Set STATUS on first child and delete the group from FDA array
S IENS1=IMGIEN1_","
F FIELD=113,113.3 D
. Q:'$D(MAGFDA(2005,IENS,FIELD))
. S MAGFDA(2005,IENS1,FIELD)=MAGFDA(2005,IENS,FIELD)
. K MAGFDA(2005,IENS,FIELD)
. Q
Q IMGIEN1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGGA02A 9859 printed Oct 16, 2024@18:03:03 Page 2
MAGGA02A ;WOIFO/SG/NST - REMOTE PROCEDURES FOR IMAGE PROPERTIES ; 24 Sep 2010 8:23 AM
+1 ;;3.0;IMAGING;**93,117**;Mar 19, 2002;Build 2238;Jul 15, 2011
+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 ;
IPDEFS ;+++++ DEFINITIONS OF PROPERTIES FOR IMAGE FILE (#2005)
+1 ;;==================================================================
+2 ;;| Parameter | File |Field|Type |Flags| Comment |
+3 ;;|------------+-------+-----+-----+-----+-------------------------|
+4 ;;|CAPTAPP |2005 | 8.1 | S | R | CAPTURE APPLICATION |
+5 ;;|CRTNDT |2005 | 110 | D | RW | CREATION DATE |
+6 ;;|DTSAVED |2005 | 7 | D | R | DATE/TIME IMAGE SAVED |
+7 ;;|GDESC |2005 | 10 | | RW | SHORT DESCRIPTION |
+8 ;;|IDFN |2005 | 5 | P | R | PATIENT |
+9 ;;|ISTAT |2005 |113 | S | RW | STATUS |
+10 ;;|ISTATBY |2005 |113.2| P | R | STATUS BY |
+11 ;;|ISTATDT |2005 |113.1| D | R | STATUS DATE |
+12 ;;|ISTATRSN |2005 |113.3| P | RW | STATUS REASON |
+13 ;;|IXCLASS | | | P | R | CLASS INDEX |
+14 ;;|IXORIGIN |2005 | 45 | S | RW | ORIGIN INDEX |
+15 ;;|IXPKG |2005 | 40 | S | RW | PACKAGE INDEX |
+16 ;;|IXPROC |2005 | 43 | P | RW | PROC/EVENT INDEX |
+17 ;;|IXSPEC |2005 | 44 | P | RW | SPEC/SUBSPEC INDEX |
+18 ;;|IXTYPE |2005 | 42 | P | RW | TYPE INDEX |
+19 ;;|LDESCR |2005 | 11 | W | R | LONG DESCRIPTION |
+20 ;;|OBJNAME |2005 | .01 | | R | OBJECT NAME |
+21 ;;|OBJTYPE |2005 | 3 | P | R | OBJECT TYPE |
+22 ;;|PARDF |2005 | 16 | P | RW | PARENT DATA FILE# |
+23 ;;|PARGRD0 |2005 | 17 | | RW | PARENT GLOBAL ROOT D0 |
+24 ;;|PARGRD1 |2005 | 63 | | RW | PARENT GLOBAL ROOT D1 |
+25 ;;|PARIPTR |2005 | 18 | | RW | PARENT...IMAGE POINTER |
+26 ;;|PROC |2005 | 6 | | RW | PROCEDURE |
+27 ;;|PROCDT |2005 | 15 | D | RW | PROCEDURE/EXAM DATE/TIME|
+28 ;;|SAVEDBY |2005 | 8 | P | R | IMAGE SAVE BY |
+29 ;;|SENSBY |2005 |112.2| P | R | CONTROLLED BY |
+30 ;;|SENSDT |2005 |112.1| D | R | CONTROLLED DATE |
+31 ;;|SENSIMG |2005 |112 | S | RW | CONTROLLED IMAGE |
+32 ;;==================================================================
+33 ;
+34 ; Custom Flags:
+35 ; R Image property can be read
+36 ; W Image property can be modified
+37 ;
+38 QUIT
+39 ;
IPDEFS1 ;+++++ DEFINITIONS OF PROPERTIES FOR IMAGE AUDIT FILE (#2005.1)
+1 ;;==================================================================
+2 ;;| Parameter | File |Field|Type |Flags| Comment |
+3 ;;|------------+-------+-----+-----+-----+-------------------------|
+4 ;;|CAPTAPP |2005.1 | 8.1 | S | R | CAPTURE APPLICATION |
+5 ;;|CRTNDT |2005.1 | 110 | D | R | CREATION DATE |
+6 ;;|DTSAVED |2005.1 | 7 | D | R | DATE/TIME IMAGE SAVED |
+7 ;;|GDESC |2005.1 | 10 | | R | SHORT DESCRIPTION |
+8 ;;|IDFN |2005.1 | 5 | P | R | PATIENT |
+9 ;;|ISTAT |2005.1 |113 | S | R | STATUS |
+10 ;;|ISTATBY |2005.1 |113.2| P | R | STATUS BY |
+11 ;;|ISTATDT |2005.1 |113.1| D | R | STATUS DATE |
+12 ;;|ISTATRSN |2005.1 |113.3| P | R | STATUS REASON |
+13 ;;|IXCLASS | | | P | R | CLASS INDEX |
+14 ;;|IXORIGIN |2005.1 | 45 | S | R | ORIGIN INDEX |
+15 ;;|IXPKG |2005.1 | 40 | S | R | PACKAGE INDEX |
+16 ;;|IXPROC |2005.1 | 43 | P | R | PROC/EVENT INDEX |
+17 ;;|IXSPEC |2005.1 | 44 | P | R | SPEC/SUBSPEC INDEX |
+18 ;;|IXTYPE |2005.1 | 42 | P | R | TYPE INDEX |
+19 ;;|LDESCR |2005.1 | 11 | W | R | LONG DESCRIPTION |
+20 ;;|OBJNAME |2005.1 | .01 | | R | OBJECT NAME |
+21 ;;|OBJTYPE |2005.1 | 3 | P | R | OBJECT TYPE |
+22 ;;|PARDF |2005.1 | 16 | P | R | PARENT DATA FILE# |
+23 ;;|PARGRD0 |2005.1 | 17 | | R | PARENT GLOBAL ROOT D0 |
+24 ;;|PARGRD1 |2005.1 | 63 | | R | PARENT GLOBAL ROOT D1 |
+25 ;;|PARIPTR |2005.1 | 18 | | R | PARENT...IMAGE POINTER |
+26 ;;|PROC |2005.1 | 6 | | R | PROCEDURE |
+27 ;;|PROCDT |2005.1 | 15 | D | R | PROCEDURE/EXAM DATE/TIME|
+28 ;;|SAVEDBY |2005.1 | 8 | P | R | IMAGE SAVE BY |
+29 ;;|SENSBY |2005.1 |112.2| P | R | CONTROLLED BY |
+30 ;;|SENSDT |2005.1 |112.1| D | R | CONTROLLED DATE |
+31 ;;|SENSIMG |2005.1 |112 | S | R | CONTROLLED IMAGE |
+32 ;;==================================================================
+33 ;
+34 ; Custom Flags:
+35 ; R Image property can be read
+36 ; W Image property can be modified
+37 ;
+38 QUIT
+39 ;
+40 ;+++++ COMPUTES THE VALUE OF THE IMAGE CLASS PROPERTY
+41 ;
+42 ; IMGFILE Image file number
+43 ;
+44 ; IENS IENS of the image record
+45 ;
+46 ; TPIENS IEN or IENS of the Image Type record in the
+47 ; IMAGE INDEX FOR TYPES file (#2005.83). If this
+48 ; parameter is not greater than 0, then the IEN is
+49 ; loaded from the image record referenced by the
+50 ; IMGFILE and IENS parameters.
+51 ;
+52 ; FLAGS Flags that control the execution (can be combined):
+53 ;
+54 ; E Return external value
+55 ;
+56 ; I Return internal value
+57 ;
+58 ; Return Values
+59 ; =============
+60 ; <0 Error descriptor (see $$ERROR^MAGUERR)
+61 ; 0 Class value is not available
+62 ; ... Property record (for the result array)
+63 ;
+64 ; Notes
+65 ; =====
+66 ;
+67 ; This is an internal entry point. Do not call it from outside
+68 ; of the MAGGA02* routines.
+69 ;
IXCLASS(IMGFILE,IENS,TPIENS,FLAGS) ;
+1 NEW MAGBUF1,MAGMSG,RC,TMP
+2 SET RC=0
+3 ;--- If the Type Index IEN is not provided,
+4 ;--- then get it form the image record
+5 IF TPIENS'>0
Begin DoDot:1
+6 SET TPIENS=$$GET1^DIQ(IMGFILE,IENS,42,"I",,"MAGMSG")
+7 if $GET(DIERR)
SET RC=$$DBS^MAGUERR("MAGMSG",IMGFILE,IENS)
+8 QUIT
End DoDot:1
if (RC<0)!(TPIENS'>0)
QUIT RC
+9 SET TPIENS=(+TPIENS)_","
+10 ;--- Load the Image Class value(s)
+11 SET TMP=$$TRFLAGS^MAGUTL05(FLAGS,"EI")
+12 DO GETS^DIQ(2005.83,TPIENS,1,TMP,"MAGBUF1","MAGMSG")
+13 if $GET(DIERR)
QUIT $$DBS^MAGUERR("MAGMSG",2005.83,TPIENS)
+14 ;--- Store the property value(s) to the result array
+15 SET TMP="IXCLASS"_U
+16 if FLAGS["I"
SET TMP=TMP_U_MAGBUF1(2005.83,TPIENS,1,"I")
+17 if FLAGS["E"
SET TMP=TMP_U_MAGBUF1(2005.83,TPIENS,1,"E")
+18 QUIT TMP
+19 ;
+20 ;+++++ REPLICATES THE CHANGES FOR A GROUP OF 1 IMAGE
+21 ;
+22 ; IMGIEN IEN of the image record in the IMAGE file (#2005)
+23 ;
+24 ; .MAGFDA FDA array with new data
+25 ;
+26 ; Return Values
+27 ; =============
+28 ; <0 Error descriptor (see the $$ERROR^MAGUERR)
+29 ; 0 Replication is not needed
+30 ; >0 IEN of the destination record for replication
+31 ;
REPLIC(IMGIEN,MAGFDA) ;
+1 NEW CNT,FIELD,IENS,IENS1,IMGIEN1
+2 ;
+3 ;=== Check if the data replication is needed
+4 SET IMGIEN1=$$GRPIEN^MAGGI12(IMGIEN)
if IMGIEN1<0
QUIT IMGIEN1
+5 IF IMGIEN1>0
Begin DoDot:1
+6 ;--- Check if the IMGIEN references the only "child" of a group
+7 SET CNT=$$GRPCT^MAGGI14(IMGIEN1)
+8 QUIT
End DoDot:1
if CNT<0
QUIT CNT
if +CNT'=1
QUIT 0
+9 IF '$TEST
Begin DoDot:1
+10 ;--- Check if the IMGIEN references a group of 1 child
+11 SET CNT=$$GRPCT^MAGGI14(IMGIEN)
+12 IF CNT<0
SET IMGIEN1=CNT
QUIT
+13 SET IMGIEN1=$SELECT(+CNT=1:$$GRPCH1^MAGGI14(IMGIEN,"E"),1:0)
+14 QUIT
End DoDot:1
if IMGIEN1'>0
QUIT IMGIEN1
+15 ;
+16 ;=== Prepare the data for replication
+17 SET IENS=IMGIEN_","
SET IENS1=IMGIEN1_","
+18 FOR FIELD=10,42,43,44,45,110,112,113,113.3
Begin DoDot:1
+19 if '$DATA(MAGFDA(2005,IENS,FIELD))
QUIT
+20 SET MAGFDA(2005,IENS1,FIELD)=MAGFDA(2005,IENS,FIELD)
+21 QUIT
End DoDot:1
+22 ;---
+23 QUIT IMGIEN1
+24 ;
+25 ;+++++ Change the STATUS of the first image in the Group
+26 ;
+27 ; IMGIEN IEN of the image record in the IMAGE file (#2005)
+28 ;
+29 ; .MAGFDA FDA array with new data
+30 ;
+31 ; Return Values
+32 ; =============
+33 ; <0 Error descriptor (see the $$ERROR^MAGUERR)
+34 ; 0 Modification is not needed
+35 ; >0 IEN of the first child
+36 ;
STATUS1(IMGIEN,MAGFDA) ;
+1 NEW IMGIEN1,IENS,IENS1,FOUND,FIELD
+2 SET IENS=IMGIEN_","
+3 SET FOUND=0
+4 ; 113 STATUS, 113.3 STATUS REASON
+5 FOR FIELD=113,113.3
IF $DATA(MAGFDA(2005,IENS,FIELD))
SET FOUND=1
QUIT
+6 ; A field is not in the array
if 'FOUND
QUIT 0
+7 ; First child in the group
SET IMGIEN1=$$GRPCH1^MAGGI14(IMGIEN,"E")
+8 IF IMGIEN1'>0
QUIT IMGIEN1
+9 ;
+10 ;=== Set STATUS on first child and delete the group from FDA array
+11 SET IENS1=IMGIEN1_","
+12 FOR FIELD=113,113.3
Begin DoDot:1
+13 if '$DATA(MAGFDA(2005,IENS,FIELD))
QUIT
+14 SET MAGFDA(2005,IENS1,FIELD)=MAGFDA(2005,IENS,FIELD)
+15 KILL MAGFDA(2005,IENS,FIELD)
+16 QUIT
End DoDot:1
+17 QUIT IMGIEN1