source: WorldVistAEHR/trunk/r/OCCURRENCE_SCREEN-QAO/QAOEDT1.m@ 1361

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

initial load of WorldVistAEHR

File size: 3.5 KB
RevLine 
[613]1QAOEDT1 ;HISC/DAD-QUICK EXCEPTION EDIT ;7/26/93 13:09
2 ;;3.0;Occurrence Screen;;09/14/1993
3 D HOME^%ZIS
4 S QAOSCLIN=$O(^QA(741.2,"C",1,0)),QAOSFIND=$O(^QA(741.6,"B",3,0))
5 S QAOSACTN=$O(^QA(741.7,"B",1,0)) D NOW^%DTC S QAOSDT=X
6ASKCLIN ;
7 K DIC S DIC="^VA(200,",DIC(0)="AEQ"
8 S DIC("A")="Select CLINICAL REVIEWER: "
9 S DIC("S")="I $D(^XUSEC(""QAOSCLIN"",+Y))",D="AK.QAOSCLIN"
10 W ! D IX^DIC G:Y'>0 EXIT S QAOSREVR=+Y
11 S QALIMIT="I $P(^(0),""^"",11)'>0",QAOSPROG="DFN^QAOEDT1" D EN2^QAOEDT
12 G ASKCLIN
13DFN ;
14 S QAOSQUIT=0,QAOSWHAT="REVIEWED" D ENDISP^QAOUTL0
15 I $O(^QA(741,QAOSD0,"REVR",0)) D Q
16 . W *7,!!?15,"*** REVIEWS ALREADY EXIST FOR THIS OCCURRENCE ***"
17 . W !?2,"*** Use the 'Clinical, Peer, Manager Review' option to edit exceptions ***",!,*7
18 . K DIR S DIR(0)="E" D ^DIR S QAOSQUIT=$S(Y'>0:1,1:0)
19 . Q
20 D EXCEPT Q:QAOSQUIT
21ASKOK ;
22 G:$O(^TMP($J,"QAOS EXCEPTION",0)) DOIT
23 W !!?5,"Mark this record as an exception (Y/N) "
24 S %=2 D YN^DICN I '% W !!?10,"Please answer Y(es) or N(o)" G ASKOK
25 S:%=-1 QAOSQUIT=1 Q:%'=1
26DOIT ;
27 W !!,"Entering Clinical Review Findings as Exception to Criteria..."
28 S ^QA(741,QAOSD0,"REVR",0)="^741.01IPA^1^1"
29 S ^QA(741,QAOSD0,"REVR",1,0)=QAOSCLIN_"^"_QAOSREVR_"^"_QAOSDT_"^^"_QAOSFIND
30 S ^QA(741,QAOSD0,"REVR",1,2,0)="^741.15PA^1^1"
31 S ^QA(741,QAOSD0,"REVR",1,2,1,0)=QAOSACTN
32 I QAOSQUIT'>0 D
33 . S QAOS=0
34 . F QAOS1=0:0 S QAOS1=$O(^TMP($J,"QAOS EXCEPTION",QAOS1)) Q:QAOS1'>0 D
35 .. S QAOS=QAOS+1,^QA(741,QAOSD0,"REVR",1,1,QAOS,0)=QAOS1
36 .. Q
37 . S ^QA(741,QAOSD0,"REVR",1,1,0)="^741.12PA^"_QAOS_"^"_QAOS
38 . Q
39 S DIK="^QA(741,",DA=QAOSD0 D IX1^DIK K DIK
40 S QAUDIT("FILE")="741^27",QAUDIT("DA")=QAOSD0,QAUDIT("ACTION")="e"
41 S QAUDIT("COMMENT")="QUICK EXCEPTION EDIT" D ^QAQAUDIT
42 W "Finished"
43 W !,"Entering Final Disposition..."
44 K DR S DIE="^QA(741,",DR="11///1;14///TODAY;16///`"_QAOSCLIN
45 S (D0,DA)=QAOSD0 D ^DIE
46 S QAUDIT("FILE")="741^27",QAUDIT("DA")=QAOSD0,QAUDIT("ACTION")="c"
47 S QAUDIT("COMMENT")="CLOSE A RECORD" D ^QAQAUDIT
48 W "Finished"
49 Q
50EXIT ;
51 K D,D0,DA,DIC,DIE,DIK,DIR,DR,QA,QAOS,QAOS1,QAOSACTN,QAOSCLIN,QAOSD0,QAQA
52 K QAOSDSEL,QAOSDT,QAOSFIND,QAOSLINE,QAOSNUM,QAOSQUIT,QAOSREVR,QAOSSCRN
53 K QAOSWHAT,QAUDIT,X,Y,QALIMIT,QAOSONE,QAOSPROG,^TMP($J,"QAOS EXCEPTION")
54 Q
55EXCEPT ; *** SELECT A GROUP OF EXCEPTIONS
56 ; *** RETURNS ^TMP($J,"QAOS EXCEPTION",EXCEPTION IEN)=""
57 ; *** RETURNS QAOSQUIT = $S('^' OUT:1,TIME OUT:1,1:0)
58 S QAOSQUIT=0,QAOSNUM=1,QAOSSCRN=+$G(^QA(741,QAOSD0,"SCRN"))
59 K ^TMP($J,"QAOS EXCEPTION")
60ASKEXC ;
61 W !!,$S(QAOSNUM>1:"Another one",1:"Select EXCEPTION")_": "
62 R X:DTIME S:('$T)!($E(X)="^") QAOSQUIT=1 Q:X=""!QAOSQUIT
63 I X?1"?".E D
64 . W !!?5,"Select an exception name or number, to deselect an item"
65 . W !?5,"type a minus sign (-) in front of it, e.g. -EXCEPTION.",!
66 . D:$O(^TMP($J,"QAOS EXCEPTION",0)) SHOW
67 . Q
68 K DIC S DIC="^QA(741.5,",DIC(0)="EMNQ"
69 S DIC("S")="S QA=^(0) I $P(QA,""^"",2)=QAOSSCRN,$P(QA,""^"",4)'>0"
70 S QAOSDSEL=$S(X?1"-".E:1,1:0) S:QAOSDSEL X=$E(X,2,$L(X))
71 D ^DIC K DIC G:+Y'>0 ASKEXC
72 I 'QAOSDSEL,'$D(^TMP($J,"QAOS EXCEPTION",+Y)) D
73 . S ^TMP($J,"QAOS EXCEPTION",+Y)="",QAOSNUM=QAOSNUM+1
74 . Q
75 I QAOSDSEL,$D(^TMP($J,"QAOS EXCEPTION",+Y)) D
76 . K ^TMP($J,"QAOS EXCEPTION",+Y) S QAOSNUM=QAOSNUM-$S(QAOSNUM>0:1,1:0)
77 . Q
78 G ASKEXC
79SHOW ;
80 N X S QAOSLINE=$Y,QAOS1="" W !,"You have already selected:"
81 F QAOS1=0:0 S QAOS1=$O(^TMP($J,"QAOS EXCEPTION",QAOS1)) Q:QAOS1'>0!QAOSQUIT D
82 . S QAOS=$G(^QA(741.5,QAOS1,0))
83 . W !?3,$P(QAOS,"^",3)," ",$P(QAOS,"^") D:$Y>(IOSL+QAOSLINE-3)
84 .. K DIR S DIR(0)="E" D ^DIR S QAOSQUIT=$S(Y'>0:1,1:0),QAOSLINE=$Y
85 .. Q
86 . Q
87 W ! S QAOSQUIT=0
88 Q
Note: See TracBrowser for help on using the repository browser.