source: FOIAVistA/trunk/r/OCCURRENCE_SCREEN-QAO/QAOEDT2.m@ 677

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

initial load of FOIAVistA 6/30/08 version

File size: 2.6 KB
Line 
1QAOEDT2 ;HISC/DAD-MISC EDITS ;7/26/93 12:27
2 ;;3.0;Occurrence Screen;;09/14/1993
3EN1 ; *** COMMITTEE EDIT
4 S QALIMIT="I $P(^(0),""^"",11)'>0",QAOSPROG="1^QAOEDT2" D EN2^QAOEDT
5 G EXIT
61 S QAOSWHAT="REVIEWED" D ENDISP^QAOUTL0
7 K DR S DIE="^QA(741,",DR="17",DR(2,741.017)=".01;4;10",DA=QAOSD0
8 D ^DIE S QAOSQUIT=$S($D(Y):1,1:0)
9 S QAUDIT("FILE")="741^27",QAUDIT("DA")=QAOSD0,QAUDIT("ACTION")="e"
10 S QAUDIT("COMMENT")="COMMITTEE REVIEW, OTHER THAN QA COMMITTEE"
11 D ^QAQAUDIT
12 Q
13EN3 ; *** FINAL DISPOSITION
14 S QALIMIT="I +$P(^QA(741,+Y,0),""^"",11)=0,$O(^QA(741,+Y,""REVR"",0))"
15 S QAOSPROG="3^QAOEDT2" D EN2^QAOEDT G EXIT
163 S QAOSWHAT="CLOSED OUT" D ENDISP^QAOUTL0
17 K DR S DIE="^QA(741,",DR="14//TODAY;16;11//CLOSED",DA=QAOSD0
18 D ^DIE S QAOSQUIT=$S($D(Y):1,1:0)
19 S QAUDIT("FILE")="741^27",QAUDIT("DA")=QAOSD0,QAUDIT("ACTION")="c"
20 S QAUDIT("COMMENT")="CLOSE A RECORD" D ^QAQAUDIT
21 Q
22EN4 ; *** DELETE
23 W !!,"Do you wish to see a list of deleted occurrences"
24 S %=2,LINE=1,QAOSQUIT=0 D YN^DICN Q:%=-1 G:%=2 DEL
25 I '% W !!?3,"Please answer Y(es) or N(o)" G EN4
26 W ! D WAIT^DICD W ! K ^TMP($J,"D")
27 F QAOSD0=0:0 S QAOSD0=$O(^QA(741,"AD",2,QAOSD0)) Q:QAOSD0'>0 D
28 . S LOC=^QA(741,QAOSD0,0),QAOSSCRN=+$G(^("SCRN")),QAOSWHO=+LOC
29 . S QAOSDATE=$P(LOC,"^",3)
30 . I $D(^DPT(QAOSWHO,0))#2 S QAOSWHO=$P(^(0),"^") D
31 .. S QAOSSCRN=+^QA(741.1,QAOSSCRN,0)
32 .. S ^TMP($J,"D",QAOSWHO,QAOSDATE,QAOSSCRN)=""
33 .. Q
34 . Q
35 I $O(^TMP($J,"D",""))="" W !?5,"*** NO DELETED OCCURRENCES FOUND ***" G DEL
36 S QAOSWHO="",LINE=$Y
37 F S QAOSWHO=$O(^TMP($J,"D",QAOSWHO)) Q:QAOSWHO=""!QAOSQUIT F QADATE=0:0 S QADATE=$O(^TMP($J,"D",QAOSWHO,QADATE)) Q:QADATE'>0!QAOSQUIT F QAOSSCRN=0:0 S QAOSSCRN=$O(^TMP($J,"D",QAOSWHO,QADATE,QAOSSCRN)) Q:QAOSSCRN'>0!QAOSQUIT D
38 . S Y=QADATE X ^DD("DD") W !?5,QAOSWHO,?30,Y,?50,QAOSSCRN
39 . Q:$Y'>(IOSL+LINE-3)
40 . K DIR S DIR(0)="E" D ^DIR K DIR
41 . S QAOSQUIT=$S(Y'>0:1,1:0),LINE=$Y
42 . Q
43DEL ;
44 S QAOSPROG="DLT^QAOEDT2" D EN1^QAOEDT
45 G EXIT
46DLT S QAOSWHAT="DELETED" D ENDISP^QAOUTL0 S (DIE,DIC)="^QA(741,"
47ASKDEL W !!?5,"Delete this record (Y/N) " S %=2
48 D YN^DICN,YNOUT Q:%=2!QAOSQUIT
49 I %=0 W !!?10,"Please answer Y(es) or N(o)" G ASKDEL
50 S DR="11///^S X=2",DA=QAOSD0 D ^DIE
51 S QAUDIT("FILE")="741^27",QAUDIT("DA")=DA,QAUDIT("ACTION")="d"
52 S QAUDIT("COMMENT")="MARK A RECORD AS DELETED" D ^QAQAUDIT
53 W !!?5,"*** RECORD HAS BEEN DELETED ***",*7,!
54 Q
55 ;
56EXIT ;
57 K %,DA,DIC,DIE,DR,I,LINE,LOC,QA,QADATE,QALIMIT,QAOPCENT,QAOS,QAOSD0
58 K QAOSDATE,QAOSQUIT,QAOSWHAT,QAOSSCRN,QAUDIT,QAOSWHO,X,Y,QAOSTYPE
59 K QAOSONE,QAOSPROG
60 K ^TMP($J,"D")
61 Q
62DIEOUT S QAOSQUIT=$S($D(DTOUT):1,$D(DUOUT):1,$D(Y):1,1:0) Q
63YNOUT S QAOSQUIT=$S(%=-1:1,1:0) Q
Note: See TracBrowser for help on using the repository browser.