ENTIRN ;WOIFO/SAB - Responsibility Notification ;2/4/2008
 ;;7.0;ENGINEERING;**87**;Aug 17, 1993;Build 16
 ;
 ; called by option ENIT RESP NOTIFY during user sign-on
 Q:'$D(^ENG(6916.3,"AOA",DUZ))  ; user doesn't have active IT assignments
 ;
 N ENC,ENDA,ENEQ,ENSD
 S ENC("U")=0 ; init count of assignments that need to be signed
 S ENC("R")=0 ; init count of assignments that need to be re-signed
 ;
 ; loop thru active assignments for user
 S ENEQ=0 F  S ENEQ=$O(^ENG(6916.3,"AOA",DUZ,ENEQ)) Q:'ENEQ  D
 . S ENDA=0 F  S ENDA=$O(^ENG(6916.3,"AOA",DUZ,ENEQ,ENDA)) Q:'ENDA  D
 . . S ENSD=$P($P($G(^ENG(6916.3,ENDA,0)),"^",5),".") ; signed date
 . . I 'ENSD S ENC("U")=ENC("U")+1 Q
 . . I ENSD,$$FMDIFF^XLFDT(DT,ENSD)>359 S ENC("R")=ENC("R")+1
 ;
 I ENC("U")=0,ENC("R")=0 Q  ; no action required
 ;
 I ENC("U") D SET^XUS1A("!"_ENC("U")_" IT Assignment(s) need signature.")
 I ENC("R") D SET^XUS1A("!"_ENC("R")_" IT Assignment(s) need re-signature.")
 D SET^XUS1A("!Use the IT Owner Menu to sign for IT equipment.")
 ;
 Q
 ;
 ;ENTIRN
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENTIRN   1057     printed  Sep 23, 2025@19:31:55                                                                                                                                                                                                      Page 2
ENTIRN    ;WOIFO/SAB - Responsibility Notification ;2/4/2008
 +1       ;;7.0;ENGINEERING;**87**;Aug 17, 1993;Build 16
 +2       ;
 +3       ; called by option ENIT RESP NOTIFY during user sign-on
 +4       ; user doesn't have active IT assignments
           if '$DATA(^ENG(6916.3,"AOA",DUZ))
               QUIT 
 +5       ;
 +6        NEW ENC,ENDA,ENEQ,ENSD
 +7       ; init count of assignments that need to be signed
           SET ENC("U")=0
 +8       ; init count of assignments that need to be re-signed
           SET ENC("R")=0
 +9       ;
 +10      ; loop thru active assignments for user
 +11       SET ENEQ=0
           FOR 
               SET ENEQ=$ORDER(^ENG(6916.3,"AOA",DUZ,ENEQ))
               if 'ENEQ
                   QUIT 
               Begin DoDot:1
 +12               SET ENDA=0
                   FOR 
                       SET ENDA=$ORDER(^ENG(6916.3,"AOA",DUZ,ENEQ,ENDA))
                       if 'ENDA
                           QUIT 
                       Begin DoDot:2
 +13      ; signed date
                           SET ENSD=$PIECE($PIECE($GET(^ENG(6916.3,ENDA,0)),"^",5),".")
 +14                       IF 'ENSD
                               SET ENC("U")=ENC("U")+1
                               QUIT 
 +15                       IF ENSD
                               IF $$FMDIFF^XLFDT(DT,ENSD)>359
                                   SET ENC("R")=ENC("R")+1
                       End DoDot:2
               End DoDot:1
 +16      ;
 +17      ; no action required
           IF ENC("U")=0
               IF ENC("R")=0
                   QUIT 
 +18      ;
 +19       IF ENC("U")
               DO SET^XUS1A("!"_ENC("U")_" IT Assignment(s) need signature.")
 +20       IF ENC("R")
               DO SET^XUS1A("!"_ENC("R")_" IT Assignment(s) need re-signature.")
 +21       DO SET^XUS1A("!Use the IT Owner Menu to sign for IT equipment.")
 +22      ;
 +23       QUIT 
 +24      ;
 +25      ;ENTIRN