QANSITE ;HISC/GJC-CHECK OF SITE PARAMETER DATA ;5/1/92
;;2.0;Incident Reporting;;08/07/1992
;
S QAZER0=$G(^QA(740,1,0)) I +QAZER0'>0 S QAERR=1 D ERROR G EXIT
S QANAME=$G(^DIC(4,+QAZER0,0)) I QANAME']"" S QAERR=2 D ERROR G EXIT
S QASTNM=$G(^DIC(4,+QAZER0,99)) I QASTNM']"" S QAERR=3 D ERROR G EXIT
;S QAEWSMS=$P(QAZER0,U,2) I QAEWSMS']"" S QAERR=4 D ERROR G EXIT
;S QAEWSDM=$P(QAZER0,U,3) I QAEWSDM']"" S QAERR=5 D ERROR G EXIT
S QANQADBS=$P(QAZER0,U,4) I QANQADBS']"" S QAERR=6 D ERROR G EXIT
S QANQADBD=$P(QAZER0,U,5) I QANQADBD']"" S QAERR=7 D ERROR G EXIT
;S QAEWSLMG=$P(QAZER0,U,6) I QAEWSLMG']"" S QAERR=8 D ERROR G EXIT
S QAINCND=$G(^QA(740,1,"QAN")) I QAINCND']"" S QAERR=9 D ERROR G EXIT
S QAINCMLG=$P(QAINCND,U) I QAINCMLG']"" S QAERR=10 D ERROR G EXIT
EXIT ;
K QAZER0,QANAME,QASTNM,QAEWSMS,QAEWSDM,QANQADBS,QANQADBD,QAEWSLMG
K QAINCND,QAINCMLG,QAERR
Q
ERROR ;
W *7,!!,"*** ",$P($T(ERR+QAERR),";;",2)," ***",!!,*7
S XQUIT=1
Q
ERR ;;ERROR MESSAGES: REASONS EWS BULLETIN COULD NOT BE SENT
;;SITE PARAMETERS FILE MISSING, CONTACT YOUR QA COORDINATOR
;;INVALID SITE NAME FOUND IN QA SITE PARAMETERS FILE
;;INVALID STATION NUMBER FOUND IN QA SITE PARAMETERS FILE
;;EWS MAIL GROUP/SERVER NOT FOUND IN QA SITE PARAMETERS FILE
;;EWS DOMAIN NOT FOUND IN QA SITE PARAMETERS FILE
;;NQADB MAIL GROUP/SERVER NOT FOUND IN QA SITE PARAMETERS FILE
;;NQADB DOMAIN NOT FOUND IN QA SITE PARAMETERS FILE
;;EWS LOCAL MAIL GROUP NOT FOUND IN QA SITE PARAMETERS FILE
;;INCIDENT REPORTING DATA NOT FOUND IN QA SITE PARAMETERS FILE
;;INCIDENT REPORTING MAILGROUP NOT FOUND IN QA SITE PARAMETERS FILE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HQANSITE 1644 printed Oct 16, 2024@18:00:52 Page 2
QANSITE ;HISC/GJC-CHECK OF SITE PARAMETER DATA ;5/1/92
+1 ;;2.0;Incident Reporting;;08/07/1992
+2 ;
+3 SET QAZER0=$GET(^QA(740,1,0))
IF +QAZER0'>0
SET QAERR=1
DO ERROR
GOTO EXIT
+4 SET QANAME=$GET(^DIC(4,+QAZER0,0))
IF QANAME']""
SET QAERR=2
DO ERROR
GOTO EXIT
+5 SET QASTNM=$GET(^DIC(4,+QAZER0,99))
IF QASTNM']""
SET QAERR=3
DO ERROR
GOTO EXIT
+6 ;S QAEWSMS=$P(QAZER0,U,2) I QAEWSMS']"" S QAERR=4 D ERROR G EXIT
+7 ;S QAEWSDM=$P(QAZER0,U,3) I QAEWSDM']"" S QAERR=5 D ERROR G EXIT
+8 SET QANQADBS=$PIECE(QAZER0,U,4)
IF QANQADBS']""
SET QAERR=6
DO ERROR
GOTO EXIT
+9 SET QANQADBD=$PIECE(QAZER0,U,5)
IF QANQADBD']""
SET QAERR=7
DO ERROR
GOTO EXIT
+10 ;S QAEWSLMG=$P(QAZER0,U,6) I QAEWSLMG']"" S QAERR=8 D ERROR G EXIT
+11 SET QAINCND=$GET(^QA(740,1,"QAN"))
IF QAINCND']""
SET QAERR=9
DO ERROR
GOTO EXIT
+12 SET QAINCMLG=$PIECE(QAINCND,U)
IF QAINCMLG']""
SET QAERR=10
DO ERROR
GOTO EXIT
EXIT ;
+1 KILL QAZER0,QANAME,QASTNM,QAEWSMS,QAEWSDM,QANQADBS,QANQADBD,QAEWSLMG
+2 KILL QAINCND,QAINCMLG,QAERR
+3 QUIT
ERROR ;
+1 WRITE *7,!!,"*** ",$PIECE($TEXT(ERR+QAERR),";;",2)," ***",!!,*7
+2 SET XQUIT=1
+3 QUIT
ERR ;;ERROR MESSAGES: REASONS EWS BULLETIN COULD NOT BE SENT
+1 ;;SITE PARAMETERS FILE MISSING, CONTACT YOUR QA COORDINATOR
+2 ;;INVALID SITE NAME FOUND IN QA SITE PARAMETERS FILE
+3 ;;INVALID STATION NUMBER FOUND IN QA SITE PARAMETERS FILE
+4 ;;EWS MAIL GROUP/SERVER NOT FOUND IN QA SITE PARAMETERS FILE
+5 ;;EWS DOMAIN NOT FOUND IN QA SITE PARAMETERS FILE
+6 ;;NQADB MAIL GROUP/SERVER NOT FOUND IN QA SITE PARAMETERS FILE
+7 ;;NQADB DOMAIN NOT FOUND IN QA SITE PARAMETERS FILE
+8 ;;EWS LOCAL MAIL GROUP NOT FOUND IN QA SITE PARAMETERS FILE
+9 ;;INCIDENT REPORTING DATA NOT FOUND IN QA SITE PARAMETERS FILE
+10 ;;INCIDENT REPORTING MAILGROUP NOT FOUND IN QA SITE PARAMETERS FILE