1 | QAOSUPL2 ;HISC/DAD-GENERATE SUMMARY OF OS UPLOAD BULLETIN ;10/7/93 11:01
|
---|
2 | ;;3.0;Occurrence Screen;**3**;09/14/1993
|
---|
3 | EN ;
|
---|
4 | D KILL^XM
|
---|
5 | S XMSUB="SUMMARY OF OCCURRENCE SCREEN"
|
---|
6 | S XMDUZ=QAOSSITE,XMTEXT="QAOSUPLD("
|
---|
7 | S XMY(QAOSSERV_"@"_QAOSDOM)=""
|
---|
8 | ASKMAIL ;
|
---|
9 | W @IOF
|
---|
10 | W !,"Reporting period: ",QAQ2HED
|
---|
11 | W !!,"Results of Reliability Assessments."
|
---|
12 | W !?5,"Date clinical review reliability assessment completed:"
|
---|
13 | S Y=QAOSRELY("C",1) X ^DD("DD") W ?69,$S(Y]"":Y,1:"N/A")
|
---|
14 | W !?5,"Percentage agreement found:"
|
---|
15 | S Y=QAOSRELY("C",2) W ?69,$S(Y]"":$J(Y,6,2)_"%",1:"N/A")
|
---|
16 | W !?5,"Date peer review reliability assessment completed: "
|
---|
17 | S Y=QAOSRELY("P",1) X ^DD("DD") W ?69,$S(Y]"":Y,1:"N/A")
|
---|
18 | W !?5,"Percentage agreement found:"
|
---|
19 | S Y=QAOSRELY("P",2) W ?69,$S(Y]"":$J(Y,6,2)_"%",1:"N/A")
|
---|
20 | W !!,"Facility Workload Data."
|
---|
21 | W !?5,"Number of admissions to acute care by bed section."
|
---|
22 | W !?10,"Medicine (Include Neurology, exclude Intermediate Med.):"
|
---|
23 | S Y=QAOSWORK(1) W ?66,$S(Y]"":$J(Y,6),1:" N/A")
|
---|
24 | W !?10,"Surgery:" S Y=QAOSWORK(2) W ?66,$S(Y]"":$J(Y,6),1:" N/A")
|
---|
25 | W !?10,"Psychiatry:" S Y=QAOSWORK(3) W ?66,$S(Y]"":$J(Y,6),1:" N/A")
|
---|
26 | W !?5,"Number of ""Unscheduled"" and ""10-10"" ambulatory care visits:"
|
---|
27 | S Y=QAOSWORK(4) W ?66,$S(Y]"":$J(Y,6),1:" N/A")
|
---|
28 | W !?5,"Number of surgical procedures performed:"
|
---|
29 | S Y=QAOSWORK(7) W ?66,$S(Y]"":$J(Y,6),1:" N/A")
|
---|
30 | ;
|
---|
31 | W !!,"WARNING: This data will overwrite your pre-existing data"
|
---|
32 | W !," at the NQADB for this semi-annual period !!"
|
---|
33 | W !!,"Ready to send the ",XMSUB," data to the National Quality"
|
---|
34 | W !,"Assurance DataBase (NQADB) at ",QAOSSERV,"@",QAOSDOM
|
---|
35 | W !,"OK to send" S %=2 D YN^DICN G:(%=-1)!(%=2) EXIT
|
---|
36 | I '% W !!?5,"Please answer Y(es) or N(o) " R QA:5 G ASKMAIL
|
---|
37 | W !,"Sending . . ." D BUILD,^XMD
|
---|
38 | EXIT ;
|
---|
39 | K %,ERROR,QA,QAOERROR,QAOSDATA,QAOSDOM,QAOSLIST,QAOSSCRN,QAOSSEQ
|
---|
40 | K QAOSSERV,QAOSSITE,QAOSSTNO,QAOSUPLD,QAOSZERO,QAO,QAOS,QAOSCLIN,QAOSCRN
|
---|
41 | K QAOSD0,QAOSDATE,QAOSFIND,QAOSLINE,QAOSMGMT,QAOSNUM,QAOSPEER,QAOSRELY
|
---|
42 | K QAOSRFPR,QAOSSPEC,QAOSWORK,QAOFINAL,QAOSACTN,QAOSCREV,QAOSD1,QAOSHOSP
|
---|
43 | K QAOSLEVL,QAOSRV,QAOSS1,QAOSS2,QAOSSTAT,QAOSTEMP,QAOSWARD,SERV
|
---|
44 | K ^UTILITY($J,"QAOSPSM"),^UTILITY($J,"QAOSXREF"),^UTILITY($J,"QAOSPEND")
|
---|
45 | D K^QAQDATE,KILL^XM S:$D(ZTQUEUED) ZTREQ="@"
|
---|
46 | Q
|
---|
47 | BUILD ;
|
---|
48 | S QAOSLIST(0)="1," D ^QAOSPSM0
|
---|
49 | K QAOSUPLD S QAOSLINE=1
|
---|
50 | SERVER ;
|
---|
51 | S QAOSUPLD(QAOSLINE)="^^QAO0^",QAOSLINE=QAOSLINE+1
|
---|
52 | SITE ;
|
---|
53 | S QAOSUPLD(QAOSLINE)="SITE",QAOSLINE=QAOSLINE+1
|
---|
54 | S QAOSUPLD(QAOSLINE)=QAOSSTNO_"^"_QAOSSITE_"^"_QAQNBEG_"^"_QAQNEND_"^"
|
---|
55 | S QAOSLINE=QAOSLINE+1
|
---|
56 | RELY ;
|
---|
57 | S QAOSUPLD(QAOSLINE)="RELY",QAOSLINE=QAOSLINE+1
|
---|
58 | S X=QAOSRELY("C",1)_"^"_QAOSRELY("C",2)_"^"
|
---|
59 | S X=X_QAOSRELY("P",1)_"^"_QAOSRELY("P",2)_"^"
|
---|
60 | S QAOSUPLD(QAOSLINE)=X,QAOSLINE=QAOSLINE+1
|
---|
61 | WORK ;
|
---|
62 | S QAOSUPLD(QAOSLINE)="WORK",QAOSLINE=QAOSLINE+1,X=""
|
---|
63 | F QA=1:1:7 S X=X_QAOSWORK(QA)_"^"
|
---|
64 | S QAOSUPLD(QAOSLINE)=X,QAOSLINE=QAOSLINE+1
|
---|
65 | ACTN ;
|
---|
66 | S QAOSUPLD(QAOSLINE)="ACTN",QAOSLINE=QAOSLINE+1,X=""
|
---|
67 | F QA=8:1:22 S X=X_QA_";"_+$G(QAOSACTN("N",QA))_"^"
|
---|
68 | S QAOSUPLD(QAOSLINE)=X,QAOSLINE=QAOSLINE+1
|
---|
69 | SCRN ;
|
---|
70 | S QAOSUPLD(QAOSLINE)="SCRN",QAOSLINE=QAOSLINE+1,QAOSSEQ=0
|
---|
71 | F S QAOSSEQ=$O(^UTILITY($J,"QAOSPSM","N",QAOSSEQ)) Q:QAOSSEQ'>0 D
|
---|
72 | . S QAOSDATA=^UTILITY($J,"QAOSPSM","N",QAOSSEQ)
|
---|
73 | . S QAOSSCRN=$P(QAOSDATA,"^")
|
---|
74 | . S X=QAOSSCRN_"^"
|
---|
75 | . F QA=2:1:9 S X=X_+$P(QAOSDATA,"^",QA)_"^"
|
---|
76 | . I "^1^4^"[("^"_QAOSSEQ_"^") S QAOSSPEC="1^2^3^4^5"
|
---|
77 | . I QAOSSEQ=2 S QAOSSPEC="N/A^N/A^N/A^N/A^5"
|
---|
78 | . I QAOSSEQ=3 S QAOSSPEC="N/A^2^N/A^N/A^2"
|
---|
79 | . S X=X_$$SERVICE(QAOSSEQ,QAOSSPEC)_"^"
|
---|
80 | . S QAOSUPLD(QAOSLINE)=X,QAOSLINE=QAOSLINE+1
|
---|
81 | . Q
|
---|
82 | Q
|
---|
83 | ;
|
---|
84 | SERVICE(SEQUENCE,PATTERN) ;
|
---|
85 | N QA F QA=1:1:5 D
|
---|
86 | . S PATTERN(0)=$P(PATTERN,"^",QA)
|
---|
87 | . Q:PATTERN(0)="N/A"
|
---|
88 | . S $P(PATTERN,"^",QA)=+$P($G(QAOSRV("N",SEQUENCE)),"^",PATTERN(0))
|
---|
89 | . Q
|
---|
90 | Q PATTERN
|
---|