Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: QAOSEWS1

QAOSEWS1.m

Go to the documentation of this file.
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