USRUM ; SLC/JER - User class membership by User library ;11/16/09
;;1.0;AUTHORIZATION/SUBSCRIPTION;**3,10,33**;Jun 20, 1997;Build 7
UPDATE(ITEM) ; Updates list following edit
N USRDA,USRDUZ,USRSIGNM,USREFF,USREXP,USRMEM,USRREC,USRCLNM
S USRDA=$P(ITEM,U,2)
S USRMEM=$G(^USR(8930.3,+USRDA,0))
;If class membership was removed restore and quit.
I USRMEM="" D RESTORE^VALM10(+ITEM) Q
S USRDUZ=+USRMEM,USRSIGNM=$$SIGNAME^USRLS(+USRDUZ)
S USRCLNM=$$CLNAME^USRLM(+$P(USRMEM,U,2),1)
S USREFF=$$DATE^USRLS(+$P(USRMEM,U,3),"MM/DD/YY")
S USREXP=$$DATE^USRLS(+$P(USRMEM,U,4),"MM/DD/YY")
S USRREC=$$SETFLD^VALM1(+ITEM,"","NUMBER")
S USRREC=$$SETFLD^VALM1(USRCLNM,USRREC,"CLASS")
S USRREC=$$SETFLD^VALM1(USREFF,USRREC,"EFFECTIVE")
S USRREC=$$SETFLD^VALM1(USREXP,USRREC,"EXPIRES")
S ^TMP("USRUSER",$J,+ITEM,0)=USRREC
D RESTORE^VALM10(+ITEM),CNTRL^VALM10(+ITEM,1,VALM("RM"),IOINHI,IOINORM)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HUSRUM 912 printed Oct 16, 2024@17:39:59 Page 2
USRUM ; SLC/JER - User class membership by User library ;11/16/09
+1 ;;1.0;AUTHORIZATION/SUBSCRIPTION;**3,10,33**;Jun 20, 1997;Build 7
UPDATE(ITEM) ; Updates list following edit
+1 NEW USRDA,USRDUZ,USRSIGNM,USREFF,USREXP,USRMEM,USRREC,USRCLNM
+2 SET USRDA=$PIECE(ITEM,U,2)
+3 SET USRMEM=$GET(^USR(8930.3,+USRDA,0))
+4 ;If class membership was removed restore and quit.
+5 IF USRMEM=""
DO RESTORE^VALM10(+ITEM)
QUIT
+6 SET USRDUZ=+USRMEM
SET USRSIGNM=$$SIGNAME^USRLS(+USRDUZ)
+7 SET USRCLNM=$$CLNAME^USRLM(+$PIECE(USRMEM,U,2),1)
+8 SET USREFF=$$DATE^USRLS(+$PIECE(USRMEM,U,3),"MM/DD/YY")
+9 SET USREXP=$$DATE^USRLS(+$PIECE(USRMEM,U,4),"MM/DD/YY")
+10 SET USRREC=$$SETFLD^VALM1(+ITEM,"","NUMBER")
+11 SET USRREC=$$SETFLD^VALM1(USRCLNM,USRREC,"CLASS")
+12 SET USRREC=$$SETFLD^VALM1(USREFF,USRREC,"EFFECTIVE")
+13 SET USRREC=$$SETFLD^VALM1(USREXP,USRREC,"EXPIRES")
+14 SET ^TMP("USRUSER",$JOB,+ITEM,0)=USRREC
+15 DO RESTORE^VALM10(+ITEM)
DO CNTRL^VALM10(+ITEM,1,VALM("RM"),IOINHI,IOINORM)
+16 QUIT