source: FOIAVistA/trunk/r/OCCURRENCE_SCREEN-QAO/QAOSPPR0.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1QAOSPPR0 ;HISC/DAD-PEER REVIEWER WORKSHEET ;2/16/93 09:31
2 ;;3.0;Occurrence Screen;;09/14/1993
3 S QAOSSCRN=+$G(^QA(741,QAOSD0,"SCRN")),QAOSPEER=$O(^QA(741.2,"C",2,0)),QAOSREVR=2,QAOSQUIT=0
4 I QAOSDATA=1 S QAOSD1="" D LOOP1 W:$E(IOST)'="C" @IOF D G EXIT
5 . Q:$E(IOST)'="C" Q:QAOSQUIT
6 . K DIR S DIR(0)="E" D ^DIR K DIR
7 . S QAOSQUIT=$S(Y'>0:1,1:0)
8 . Q
9 I QAOSDATA=2,'$D(^QA(741,QAOSD0,"REVR","B",QAOSPEER)) S QAOSD1="" D LOOP1 W:$E(IOST)'="C" @IOF D G EXIT
10 . Q:$E(IOST)'="C" Q:QAOSQUIT
11 . K DIR S DIR(0)="E" D ^DIR K DIR
12 . S QAOSQUIT=$S(Y'>0:1,1:0)
13 . Q
14 F QAOSD1=0:0 S QAOSD1=$O(^QA(741,QAOSD0,"REVR","B",QAOSPEER,QAOSD1)) Q:QAOSD1'>0!QAOSQUIT D LOOP1 W:$E(IOST)'="C" @IOF I ('QAOSQUIT),$E(IOST)="C" K DIR S DIR(0)="E" D ^DIR K DIR S QAOSQUIT=$S(Y'>0:1,1:0) Q:QAOSQUIT
15EXIT ;
16 K ARRAY,D0,DIWF,DIWL,DIWR,LOC,QA,QAOSD1,QAOSHEAD,QAOSMULT,QAOSPAGE,QAOSREVR,QAOSSCRN,QAOSPEER,X,XX,Y
17 Q
18LOOP1 ;
19 S QAOSMULT=$S(QAOSD1'>0:"",$D(^QA(741,QAOSD0,"REVR",QAOSD1,0))#2:^(0),1:"")
20 S QA=$P(QAOSMULT,"^",2) S $P(QAOSREVR,"^",2)=$S(QA'>0:"",$D(^VA(200,QA,0))#2:$P(^(0),"^"),1:"")
21 S QAOSPAGE=1 D ^QAOSPHDR
22 S QAOSHEAD="FINDINGS" W !!,QAOSHEAD
23 F QA=0:0 S QA=$O(^QA(741.6,"B",QA)) Q:QA'>0!QAOSQUIT F D0=0:0 S D0=$O(^QA(741.6,"B",QA,D0)) Q:D0'>0!QAOSQUIT S LOC=^QA(741.6,D0,0) I $P(LOC,"^",3)["2" W !?3,$S($P(QAOSMULT,"^",5)=D0:"_X_",1:"___"),?8,$J(QA,3,0),?15,$P(LOC,"^",2) D CHK
24 Q:QAOSQUIT
25 W !!,"If quality of care is rated as level 2 or 3, indicate involved practitioner(s).",!!," __________________________________________________________________________" S QAOSHEAD="" D CHK Q:QAOSQUIT
26 K ARRAY
27 F QA=0:0 S QA=$O(^QA(741.7,"B",QA)) Q:QA'>0 F D0=0:0 S D0=$O(^QA(741.7,"B",QA,D0)) Q:D0'>0 S LOC=^QA(741.7,D0,0) I $P(LOC,"^",2)["2" S ARRAY(+LOC)=$S(QAOSD1'>0:"___",$D(^QA(741,QAOSD0,"REVR",QAOSD1,2,"B",D0)):"_X_",1:"___")_"^"_$P(LOC,"^",3)
28 S QAOSHEAD="ACTION(S)" W !!,QAOSHEAD F QA=0:0 S QA=$O(ARRAY(QA)) Q:QA'>0!QAOSQUIT W !?3,$P(ARRAY(QA),"^"),?8,$J(QA,3,0),?15,$P(ARRAY(QA),"^",2) D CHK
29 Q:QAOSQUIT
30 S QAOSHEAD="SEVERITY OF OUTCOME" W !!,QAOSHEAD
31 S LOC=$S(QAOSHOW=3!(QAOSDATA=1):"",1:$P($G(^QA(741,QAOSD0,0)),"^",18))
32 F QA=-1:0 S QA=$O(^QA(741.8,"B",QA)) Q:QA=""!QAOSQUIT F D0=0:0 S D0=$O(^QA(741.8,"B",QA,D0)) Q:D0'>0!QAOSQUIT W !?3,$S(D0=LOC:"_X_",1:"___"),?8,$J(QA,3,0),?15,$P(^QA(741.8,D0,0),"^",2) D CHK
33 Q:QAOSQUIT
34 W !!,"DATE REVIEW COMPLETED: " S Y=$P(QAOSMULT,"^",3) X ^DD("DD") W $S(Y]"":Y,1:"____________________")
35 S QAOSPDUE=$P($G(^QA(741,QAOSD0,0)),"^",12),QAOSPDAY=$P($G(^QA(740,1,"OS")),"^") I QAOSPDUE!QAOSPDAY D
36 . S Y=QAOSPDUE X ^DD("DD") W ?47,"DUE DATE: "
37 . W $S((QAOSHOW=3)!(QAOSDATA=1)!(Y=""):"____________________",1:Y)
38 . Q
39 D CHK Q:QAOSQUIT
40 S QAOSHEAD="" W !!,"Can steps be taken to improve the care of similar patients in the future?" D CHK Q:QAOSQUIT
41 W !,"___ YES, ___ NO. If YES, describe. (Please answer even if quality of" D CHK W !,"care was rated as ""LEVEL 1"".)" D CHK Q:QAOSQUIT
42 S QAOSHEAD="" W !!,"Should the care in this case be considered for educational presentations" D CHK Q:QAOSQUIT
43 W !,"because it was exemplary? ___ YES, ___ NO. If YES, describe." D CHK Q:QAOSQUIT
44 S QAOSHEAD="COMMENTS" W !!,QAOSHEAD S DIWL=4,DIWR=75,DIWF="" K ^UTILITY($J,"W")
45 I QAOSHOW'=3,QAOSDATA=2 F QAOSS0=0:0 S QAOSS0=$O(^QA(741,QAOSD0,"REVR",+QAOSD1,3,QAOSS0)) Q:QAOSS0'>0 S X=^QA(741,QAOSD0,"REVR",QAOSD1,3,QAOSS0,0) D ^DIWP
46 F QA=0:0 S QA=$O(^UTILITY($J,"W",DIWL,QA)) Q:QA'>0!QAOSQUIT W !?3,^UTILITY($J,"W",DIWL,QA,0) D CHK
47 Q:QAOSQUIT
48BLANK I $Y<(IOSL-6) W ! G BLANK
49 W !,"SIGNATURE"
50 Q
51CHK ;
52 Q:$Y'>(IOSL-6) N D0,QA,Y I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR K DIR S QAOSQUIT=$S(Y'>0:1,1:0) Q:QAOSQUIT
53 D ^QAOSPHDR W !!,QAOSHEAD
54 Q
Note: See TracBrowser for help on using the repository browser.