source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVFMAN.m@ 1608

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

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1WVFMAN ;HCIOFO/FT,JR IHS/ANMC/MWR - FILEMAN CALLS
2 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;; CALLS TO FILEMAN WITH PRE- AND POST-CALL VARIABLE SETTING.
5 ;
6 ;
7DIC(DIC,DIC0,Y,DICA,DICB,DICS,X,WVPOP,DICW) ;EP
8 ;---> CALL TO ^DIC
9 ;---> PARAMETERS:
10 ; 1 - DIC=DIC (REQUIRED)
11 ; 2 - DIC0=DIC(0) (REQUIRED)
12 ; 3 - Y (RETURNED) FROM CALL TO ^DIC
13 ; 4 - DICA=DIC("A") (OPTIONAL) PROMPT
14 ; 5 - DICB=DIC("B") (OPTIONAL) DEFAULT
15 ; 6 - DICS=DIC("S") (OPTIONAL) SCREEN
16 ; 7 - X (OPTIONAL) IF DIC(0)'["A"
17 ; 8 - WVPOP (OPTIONAL) WVPOP=1 IF DTOUT OR DUOUT
18 ; 9 - DICW=DIC("W") (OPTIONAL)
19 ;
20 ;---> EXAMPLE: D DIC^WVFMAN(790,"QEMAL",.Y," Select PATIENT: ")
21 ;
22 I $G(DIC)']""!($G(DIC0)']"") S WVPOP=1 Q
23 S WVPOP=0 S:DIC DLAYGO=$P(DIC,".")
24 S DIC(0)=DIC0
25 S:$G(DICA)]"" DIC("A")=DICA
26 S:$G(DICB)]"" DIC("B")=DICB
27 S:$G(DICS)]"" DIC("S")=DICS
28 S:$G(DICW)]"" DIC("W")=DICW
29 D ^DIC
30 S:($D(DTOUT))!($D(DUOUT)) WVPOP=1
31 D DKILLS
32 Q
33 ;
34DDS(DDSFILE,DR,DA,DDSPARM,DDSCHANG,WVPOP) ;EP
35 ;---> CALL TO ^DDS
36 ;---> NOTE: SCREENMAN AUTOMATICALLY USES INCREMENTAL LOCKS.
37 ;---> PARAMETERS:
38 ; 1 - DDSFILE=FILE# (REQUIRED)
39 ; 2 - DR=FORM (REQUIRED)
40 ; 3 - DA=RECORD (REQUIRED)
41 ; 4 - DDSPARM (C/E) (OPTIONAL) C=REGISTER CHANGE IN DDSCHANG
42 ; 5 - DDSCHANG (RETURNED) DDSCHANG=1 IF CHANGE TO DATABASE
43 ; 6 - WVPOP (RETURNED) FAIL/QUIT/TIMEOUT
44 ;
45 ;---> EXAMPLES:
46 ; D DDS^WVFMAN(790.02,"[WV SITE PARAMS-FORM-1]",+Y)
47 ; D DDS^WVFMAN(790.1,"[WV PROC-FORM-LAB]",DA,"C",.WVCHG,.WVPOP)
48 ;
49 N WVDA S WVDA=DA,WVPOP=0
50 I DDSFILE S DDSFILE=^DIC(DDSFILE,0,"GL")
51 L +@(DDSFILE_WVDA_")"):5 I '$T S WVPOP=1 D LOCKED^WVUTL3 Q
52 K ^TMP("DDS",$J)
53 D:'$D(IOST(0)) HOME^%ZIS D ENS^%ZISS
54 D ^DDS
55 S:$D(DTOUT) WVPOP=1
56 I $D(DIMSG)!($D(DIERR)) D S WVPOP=1
57 .W !?5,"* The Screen Manager could not edit this record."
58 .W !?7,"Please contact your Site Manager." D DIRZ^WVUTL3
59 L -@(DDSFILE_WVDA_")")
60 D DKILLS
61 Q
62 ;
63DIE(DIE,DR,DA,WVPOP,Z) ;EP
64 ;---> CALL TO ^DIE
65 ;---> PARAMETERS:
66 ; 1 - DIE=DIE (REQUIRED)
67 ; 2 - DR=DR (REQUIRED)
68 ; 3 - DA=DA (REQUIRED)
69 ; 4 - WVPOP (RETURNED) WVPOP=1 INDICATES FAILURE/QUIT
70 ; 5 - Z (OPTIONAL) Z=1 IF USER SHOULD *NOT* BE NOTIFIED
71 ; RECORD WAS LOCKED.
72 ;
73 ;---> EXAMPLE: D DIE^WVFMAN(790,DR,+Y,.WVPOP)
74 ; (+Y FROM DIC CALL, DR COULD BE LITERAL IF SHORT.)
75 ;
76 N WVDA S WVDA=DA,WVPOP=0
77 I DIE S DIE=^DIC(DIE,0,"GL")
78 L +@(DIE_WVDA_")"):5 I '$T S WVPOP=1 D:'$G(Z) LOCKED^WVUTL3 Q
79 D ^DIE
80 I $D(DTOUT) S WVPOP=1
81 L -@(DIE_WVDA_")")
82 D DKILLS
83 Q
84 ;
85FILE(DIC,DICDR,DIC0,X,DLAYGO,Y) ; EP - CALL FILE^DICN
86 K DD,DO
87 I DIC S DIC=^DIC(DIC,0,"GL")
88 S:$G(DICDR)]"" DIC("DR")=DICDR S DIC(0)=DIC0
89 D FILE^DICN
90 D DKILLS
91 Q
92 ;
93DIK ; EP - CALL ^DIK
94 D ^DIK
95 D DKILLS
96 Q
97 ;
98DIQ ; EP - CALL ^DIQ
99 D EN^DIQ
100 D DKILLS
101 Q
102 ;
103DIQ1 ; EP - CALL ^DIQ1
104 D EN^DIQ1
105 D DKILLS
106 Q
107 ;
108DKILLS ;EP
109 K D,D0,D1,DA,DD,DDH,DI,DIADD,DIC,DIC1,DICR,DIE,DIG,DIH,DIK,DILC
110 K DINUM,DIRUT,DIQ,DIQ2,DIR,DIU,DIW,DIWF,DIWL,DIWR,DIWT,DK,DL
111 K DLAYGO,DN,DQ,DR,DTOUT,DUOUT,DX
112 Q
Note: See TracBrowser for help on using the repository browser.