source: FOIAVistA/trunk/r/OCCURRENCE_SCREEN-QAO/QAOSSFR0.m@ 1250

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1QAOSSFR0 ;HISC/DAD-OCCURRENCE SCREEN / MONITORING SYSTEM AUTO ENROLL SPECIAL FUNCTIONS ROUTINE ;6/29/93 09:31
2 ;;3.0;Occurrence Screen;;09/14/1993
3 K ^TMP("QAO",$J)
4 S QAOSSCRN=+$O(^QA(741.1,"AM",QAMD0,0)) G:QAOSSCRN'>0 EXIT
5 S QAOS740=$G(^QA(740,1,"OS"))
6 F QAOSDFN=0:0 S QAOSDFN=$O(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN)) Q:QAOSDFN'>0 F QAOSDATE=0:0 S QAOSDATE=$O(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN,QAOSDATE)) Q:QAOSDATE'>0!(QAOSDATE\1'?7N) D LOOP1
7 F QAOSSCR=0:0 S QAOSSCR=$O(^QA(741.1,QAOSSCR)) Q:(QAOSSCR'>0)!(QAOSSCR'<200) I $P($G(^QA(741.1,QAOSSCR,0)),"^",4)'>0 S QAOSTOT(QAOSSCR)=0
8 F QAOSDT=QAMTODAY-.0000001:0 S QAOSDT=$O(^QA(741,"ARCD",QAOSDT)) Q:(QAOSDT'>0)!(QAOSDT>(QAMTODAY+.24))!(QAOSDT\1'?7N) F QAOSS0=0:0 S QAOSS0=$O(^QA(741,"ARCD",QAOSDT,QAOSS0)) Q:QAOSS0'>0 D
9 . S QAOSSCR=+$G(^QA(741,QAOSS0,"SCRN"))
10 . Q:(QAOSSCR'>0)!(QAOSSCR'<200) Q:$D(QAOSTOT(QAOSSCR))[0
11 . S QAOSTOT(QAOSSCR)=QAOSTOT(QAOSSCR)+1
12 . Q
13 K DD,DIC,DINUM,DO S DIC="^QA(741.99,",DIC(0)="LMN",DLAYGO=741.99
14 S X=QAMTODAY D ^DIC S QAO74199=+Y
15 K DR S DIE="^QA(741.99,",DA=QAO74199,DR=""
16 F QAOSSCR=0:0 S QAOSSCR=$O(QAOSTOT(QAOSSCR)) Q:QAOSSCR'>0 D
17 . S QA=$P($T(@(10*QAOSSCR\1)),";;",2)
18 . S DR=DR_$S(QA]"":$E(";",DR]"")_QA_"///"_QAOSTOT(QAOSSCR),1:"")
19 . Q
20 I DR]"" D ^DIE
21 D PRINT^QAOSSFR1
22EXIT ;
23 K ^TMP("QAO",$J)
24 K %DT,DA,DD,DFN,DIC,DIE,DINUM,DLAYGO,DO,DR,PAGE,QAO74199,QAOCOUNT
25 K QAOSD0,QAOSDATA,QAOSDATE,QAOSDFN,QAOSDIAG,QAOSDT,QAOSDUP
26 K QAOSMVDT,QAOSPAT,QAOSPID,QAOSQUIT,QAOSS0,QAOSSCR,QAOSSCRN
27 K QAOSSERV,QAOSTOT,QAOSTXSP,QAOSWARD,QAUDIT,TODAY,UNDL,VA,X,Y
28 K ZTDESC,ZTDTH,ZTIO,ZTRTN,ZTSAVE,ZTSK
29 Q
30 ;
31LOOP1 ;
32 S QAOSDFN(0)=$S($D(^DPT(QAOSDFN,0))#2:$P(^(0),"^"),1:QAOSDFN)
33 S QAOSWARD=$G(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN,QAOSDATE,"WARD"))
34 S QAOSDIVN=$P($G(^DIC(42,+QAOSWARD,0)),"^",11)
35 S QAOSDIVN=$S($D(^DG(40.8,+QAOSDIVN,0))#2:QAOSDIVN,1:"*")
36 I $P(QAOSWARD,"^",2) S QAOSWARD=+$P(QAOSWARD,"^",2)
37 E S QAOSWARD=+$P($G(^DIC(42,+QAOSWARD,44)),"^")
38 S X=$G(^SC(+QAOSWARD,0)),QAOSWARD=$S(X]"":QAOSWARD,1:"")
39 S QAOSWARD=$S(QAOSWARD'>0:"","^C^W^"[("^"_$P(X,"^",3)_"^"):+QAOSWARD,1:"")
40 S QAOSTXSP=$G(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN,QAOSDATE,"TXSP"))
41 S QAOSTXSP=$S(QAOSTXSP'>0:"",$D(^DIC(45.7,+QAOSTXSP,0))#2:+QAOSTXSP,1:"")
42 S QAOSSERV=$P($G(^DIC(45.7,+QAOSTXSP,0)),"^",4)
43 S QAOSSERV=$S(QAOSSERV'>0:"",$D(^DIC(49,+QAOSSERV,0))#2:+QAOSSERV,1:"")
44 S QAOSDIAG=$G(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN,QAOSDATE,"DIAG"))
45 S QAOSMVDT=$G(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN,QAOSDATE,"MVDT"))
46 S QAOSAADM=$G(^UTILITY($J,"QAM FALL OUT",QAMD0,QAOSDFN,QAOSDATE,"AADM"))
47 S QAOSAADM=$S(QAOSDATE\1'<($P($G(^DGPM(+QAOSAADM,0)),"^")\1):QAOSAADM,1:"")
48 S QAOSDUP=0,QAOSD0=+$O(^QA(741,"AA",QAOSSCRN,QAOSDATE,QAOSDFN,0))
49 I QAOSD0 S QAOSDUP=1 G INFILE
50 K DD,DIC,DINUM,DO S DIC="^QA(741,",DIC(0)="L",DLAYGO=741,X=QAOSDFN
51 D FILE^DICN S QAOSD0=+Y
52 S DIE="^QA(741,",DA=QAOSD0
53 S DR="1///^S X=QAOSDATE;3///`"_QAOSSCRN_";11///^S X=0;28///^S X=QAMTODAY"
54 S:QAOSAADM DR=DR_";.02///`"_QAOSAADM
55 S:QAOSWARD DR=DR_";4///`"_QAOSWARD
56 S:QAOSSERV DR=DR_";5///`"_QAOSSERV
57 S:QAOSTXSP DR=DR_";6///`"_QAOSTXSP
58 S:QAOSSCRN=109 DR=DR_";19///3"
59 D ^DIE
60 S QAUDIT("FILE")="741^27",QAUDIT("DA")=QAOSD0,QAUDIT("ACTION")="o"
61 S QAUDIT("COMMENT")="AUTO ENROLLED OCCURRENCE" D ^QAQAUDIT
62 S ^TMP("QAO",$J,"WKS",QAOSDIVN,QAOSDFN(0),QAOSD0)=""
63INFILE S DFN=QAOSDFN D PID^VADPT6 S QAOSPID=VA("PID")
64 S ^TMP("QAO",$J,"RPT",QAOSDIVN,$E("*",QAOSDUP)_QAOSDFN(0),QAOSD0)=QAOSPID_"^"_QAOSWARD_"^"_QAOSDIAG_"^"_QAOSMVDT
65 Q
66SCRN ;;TOTAL FIELD FOR EACH SCREEN IN FILE #741.99
671010 ;;1
681011 ;;1.1
691020 ;;2
701030 ;;3
711041 ;;4.1
721042 ;;4.2
731051 ;;5.1
741052 ;;5.2
751061 ;;6.1
761062 ;;6.2
771070 ;;7
781080 ;;8
791090 ;;9
801990 ;;99
Note: See TracBrowser for help on using the repository browser.