QAOSEWS1 ;HISC/DAD-GENERATE 'EARLY WARNING SYSTEM' BULLETINS ;12/10/92 08:32
;;3.0;Occurrence Screen;;09/14/1993
;
; MESSAGE FORMAT:
; 1) OCCURRENCE SCREEN TYPE (10DAY OR DEATH)
; 2) STATION NUMBER (FROM: 4,99)
; 3) STATION NAME (FROM: 4,.01)
; 4) REPORTING PERIOD START DATE
; 5) REPORTING PERIOD END DATE
; 6) SCREEN NUMBER (101.1=10 DAY READMISSION, 109=DEATH)
; 7) # OCCURRENCES REVIEWED CLINICALLY
; 8) # OCCURRENCES REFERRED TO PEER REVIEW
; 9) OUTCOME OF PEER REVIEW: LEVEL 1
; 10) OUTCOME OF PEER REVIEW: LEVEL 2
; 11) OUTCOME OF PEER REVIEW: LEVEL 3
; 12) OUTCOME OF PEER REVIEW: PENDING
; 13) # OCCURRENCES REFERRED FOR SYSTEM ISSUES
; 14) # OCCURRENCES REFERRED FOR EQUIPMENT ISSUES
; 15) <NULL>
;
EN F QAOSSEQ=0:0 S QAOSSEQ=$O(^UTILITY($J,"QAOSPSM","N",QAOSSEQ)) Q:QAOSSEQ'>0 D
. S QAOSDATA=^UTILITY($J,"QAOSPSM","N",QAOSSEQ)
. S X=10*$P(QAOSDATA,"^")\1 S QAOSTEXT=$P($T(@X),";;",2) Q:QAOSTEXT=""
. D KILL^XM K QAOSEWS S XMSUB="OCCURRENCE SCREEN "_$P(QAOSTEXT,"^")
. S XMDUZ=QAOSSITE,XMY(QAOSSERV_"@"_QAOSDOM)="",XMTEXT="QAOSEWS("
. I QAOSLGRP]"",QAOSLDOM]"" S XMY("G."_QAOSLGRP_"@"_QAOSLDOM)=""
. S QAOSEWS(1)=$P(QAOSTEXT,"^",2)_"^"_QAOSSTNO_"^"_QAOSSITE_"^"_QAQNBEG_"^"_QAQNEND_"^"_QAOSDATA
. F QA=7:1:14 S:$P(QAOSEWS(1),"^",QA)="" $P(QAOSEWS(1),"^",QA)=0
. S $P(QAOSEWS(1),"^",15)="" G:QAOSTASK SEND
ASK . W !!,"Ready to send ",XMSUB," data",!,"to ",QAOSSERV,"@",QAOSDOM
. W !,"OK to send" S %=2 D YN^DICN Q:(%=-1)!(%=2)
. I '% W !!?5,"Please answer Y(es) or N(o)" G ASK
. W !,"Sending . . ."
SEND . D ^XMD
. Q
Q
SCREENS ;;SCREEN*10 ;; SUBJECT OF EWS BULLETIN ^ 1ST PIECE OF EWS DATA
1011 ;;10 DAY READMISSIONS^10DAY
1090 ;;DEATHS^DEATH
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HQAOSEWS1 1766 printed Dec 13, 2024@02:21:31 Page 2
QAOSEWS1 ;HISC/DAD-GENERATE 'EARLY WARNING SYSTEM' BULLETINS ;12/10/92 08:32
+1 ;;3.0;Occurrence Screen;;09/14/1993
+2 ;
+3 ; MESSAGE FORMAT:
+4 ; 1) OCCURRENCE SCREEN TYPE (10DAY OR DEATH)
+5 ; 2) STATION NUMBER (FROM: 4,99)
+6 ; 3) STATION NAME (FROM: 4,.01)
+7 ; 4) REPORTING PERIOD START DATE
+8 ; 5) REPORTING PERIOD END DATE
+9 ; 6) SCREEN NUMBER (101.1=10 DAY READMISSION, 109=DEATH)
+10 ; 7) # OCCURRENCES REVIEWED CLINICALLY
+11 ; 8) # OCCURRENCES REFERRED TO PEER REVIEW
+12 ; 9) OUTCOME OF PEER REVIEW: LEVEL 1
+13 ; 10) OUTCOME OF PEER REVIEW: LEVEL 2
+14 ; 11) OUTCOME OF PEER REVIEW: LEVEL 3
+15 ; 12) OUTCOME OF PEER REVIEW: PENDING
+16 ; 13) # OCCURRENCES REFERRED FOR SYSTEM ISSUES
+17 ; 14) # OCCURRENCES REFERRED FOR EQUIPMENT ISSUES
+18 ; 15) <NULL>
+19 ;
EN FOR QAOSSEQ=0:0
SET QAOSSEQ=$ORDER(^UTILITY($JOB,"QAOSPSM","N",QAOSSEQ))
if QAOSSEQ'>0
QUIT
Begin DoDot:1
+1 SET QAOSDATA=^UTILITY($JOB,"QAOSPSM","N",QAOSSEQ)
+2 SET X=10*$PIECE(QAOSDATA,"^")\1
SET QAOSTEXT=$PIECE($TEXT(@X),";;",2)
if QAOSTEXT=""
QUIT
+3 DO KILL^XM
KILL QAOSEWS
SET XMSUB="OCCURRENCE SCREEN "_$PIECE(QAOSTEXT,"^")
+4 SET XMDUZ=QAOSSITE
SET XMY(QAOSSERV_"@"_QAOSDOM)=""
SET XMTEXT="QAOSEWS("
+5 IF QAOSLGRP]""
IF QAOSLDOM]""
SET XMY("G."_QAOSLGRP_"@"_QAOSLDOM)=""
+6 SET QAOSEWS(1)=$PIECE(QAOSTEXT,"^",2)_"^"_QAOSSTNO_"^"_QAOSSITE_"^"_QAQNBEG_"^"_QAQNEND_"^"_QAOSDATA
+7 FOR QA=7:1:14
if $PIECE(QAOSEWS(1),"^",QA)=""
SET $PIECE(QAOSEWS(1),"^",QA)=0
+8 SET $PIECE(QAOSEWS(1),"^",15)=""
if QAOSTASK
GOTO SEND
ASK WRITE !!,"Ready to send ",XMSUB," data",!,"to ",QAOSSERV,"@",QAOSDOM
+1 WRITE !,"OK to send"
SET %=2
DO YN^DICN
if (%=-1)!(%=2)
QUIT
+2 IF '%
WRITE !!?5,"Please answer Y(es) or N(o)"
GOTO ASK
+3 WRITE !,"Sending . . ."
SEND DO ^XMD
+1 QUIT
End DoDot:1
+2 QUIT
SCREENS ;;SCREEN*10 ;; SUBJECT OF EWS BULLETIN ^ 1ST PIECE OF EWS DATA
1011 ;;10 DAY READMISSIONS^10DAY
1090 ;;DEATHS^DEATH