source: WorldVistAEHR/trunk/r/OCCURRENCE_SCREEN-QAO/QAOUTL0.m@ 1166

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1QAOUTL0 ;HISC/DAD-OCCURRENCE SCREEN UTILITIES ;2/4/93 08:45
2 ;;3.0;Occurrence Screen;;09/14/1993
3ENDISP ;
4 N X,Y,UNDL,QAOS,QAOSDFN,QAOSZERO,QAOSWARD,QAOSDATE,QAOSPDUE,QAOSMDUE,QAOSSCRN
5 S:$D(QAOSWHAT)[0 QAOSWHAT="REVIEWED"
6 K UNDL S $P(UNDL,"-",18+$L(QAOSWHAT))=""
7 S QAOSZERO=$G(^QA(741,QAOSD0,0))
8 S QAOSDFN=$S($D(^DPT(+QAOSZERO,0))#2:$P(^(0),"^"),1:+QAOSZERO)
9 S QAOSWARD=+$P(QAOSZERO,"^",5),QAOSWARD=$P($G(^SC(QAOSWARD,0)),"^")
10 S Y=$P(QAOSZERO,"^",3) D DD^%DT S QAOSDATE=Y
11 S Y=$P(QAOSZERO,"^",12) X ^DD("DD") S QAOSPDUE=Y
12 S Y=$P(QAOSZERO,"^",13) X ^DD("DD") S QAOSMDUE=Y
13 S QAOS=QAOSPDUE_QAOSMDUE
14 S QAOSSCRN=+$G(^QA(741,QAOSD0,"SCRN"))
15 S QAOSSCRN=$S($D(^QA(741.1,QAOSSCRN,0))#2:^(0),1:QAOSSCRN)
16 S QAOSSCRN=$P(QAOSSCRN,"^")_" "_$P(QAOSSCRN,"^",2)
17 W @IOF
18 W !!?5,"OCCURRENCE BEING ",QAOSWHAT W:QAOS]"" ?51,"REVIEW DUE DATES"
19 W !?5,UNDL W:QAOS]"" ?51,"----------------"
20 W !?5,"NAME : ",QAOSDFN W:QAOS]"" ?51,"PEER : ",QAOSPDUE
21 W !?5,"WARD/CLINIC : ",QAOSWARD W:QAOS]"" ?51,"MGMT : ",QAOSMDUE
22 W !?5,"DATE : ",QAOSDATE
23 W !?5,"SCREEN : ",QAOSSCRN,!
24 Q
25ENCHOS ;
26 R !!,"Select OPEN, CLOSED, or BOTH types of occurrences? BOTH// ",QAOSTYPE:DTIME S:'$T QAOSTYPE="^"
27 S QAOSQUIT=$S($E(QAOSTYPE)="^":1,1:0) Q:QAOSQUIT
28 S X=QAOSTYPE X ^%ZOSF("UPPERCASE") S QAOSTYPE=Y
29 I $F("^BOTH^OPEN^CLOSED","^"_QAOSTYPE)'>0 D G ENCHOS
30 . W:$E(QAOSTYPE)'="?" " ??",*7 W !
31 . W !?5,"Valid entries are OPEN, CLOSED, BOTH, or Up-Arrow (^) to exit."
32 . W !?10,"Enter OPEN to select occurrences whose status is open."
33 . W !?10,"Enter CLOSED to select occurrences whose status is closed."
34 . W !?10,"Enter BOTH to select both OPEN and CLOSED occurrences."
35 . W !?10,"Enter Up-Arrow (^) to EXIT."
36 . Q
37 W $P($P("^BOTH^OPEN^CLOSED^","^"_QAOSTYPE,2),"^")
38 S QAOSTYPE=$S(QAOSTYPE["B":"",1:$E(QAOSTYPE))
39 S QALIMIT="I +$P(^QA(741,+Y,0),""^"",11)"_$S(QAOSTYPE="O":"=0",QAOSTYPE="C":"=1",1:"<2")
40 Q
Note: See TracBrowser for help on using the repository browser.