source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGPREP2.m@ 922

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1DGPREP2 ;ALB/SCK - Pre-Registration Cont. ; 12/31/96
2 ;;5.3;Registration;**109**;Aug 13, 1993
3 Q
4 ;
5EN ; -- main entry point for the DGPRE HIST protocol
6 I '$D(^DGS(41.43,"C",PTIFN)) Q
7 D EN^VALM("DGPRE HIST")
8 Q
9 ;
10HDR ; -- header code
11 S VALMHDR(1)="Calling History for "_$P(^DPT(PTIFN,0),U)
12 Q
13 ;
14INIT ; -- init variables and list array
15 ; Variables
16 ; DGPDT - Formatted date from Call Log, #41.43
17 ; DGPDD - Status entries from the DD for #41.43
18 ; DGPNR - No. of entries, index for LM IDX global
19 ; DGPN1 - Local Var for $O
20 ; DGPDATA - 0 node from Call Log file, #41.43
21 ;
22 N DGPN1,DGPNR,DGPNDX,DGPDD,DGPDT,DGPDATA
23 ;
24 K ^TMP($J)
25 K ^TMP("DGPPR2",$J)
26 S DGPN1=0 F S DGPN1=$O(^DGS(41.43,"C",PTIFN,DGPN1)) Q:'DGPN1 D
27 . S ^TMP($J,$P(^DGS(41.43,DGPN1,0),U))=DGPN1
28 S DGPNR=1
29 S DGPDD=$P(^DD(41.43,3,0),U,3)
30 S DGPN1=1 F Q:$P(DGPDD,";",DGPN1)']"" S DGPT($P($P(DGPDD,";",DGPN1),":"))=$P($P(DGPDD,";",DGPN1),":",2),DGPN1=DGPN1+1
31 S DGPN1=9999999.999999 F S DGPN1=$O(^TMP($J,DGPN1),-1) Q:'DGPN1 D
32 . S DGPDATA=^DGS(41.43,^TMP($J,DGPN1),0)
33 . S DGPDT=$$FMTE^XLFDT($P(DGPDATA,U),1)
34 . S X=$$SETFLD^VALM1(DGPNR,"","INDEX")
35 . S X=$$SETFLD^VALM1(DGPDT,X,"DATE/TIME")
36 . I $P(DGPDATA,U,3)]"" S X=$$SETFLD^VALM1($P(^VA(200,$P(DGPDATA,U,3),0),U),X,"CALLED BY")
37 . I $P(DGPDATA,U,4)]"" S X=$$SETFLD^VALM1(DGPT($P(DGPDATA,U,4)),X,"STATUS")
38 . S ^TMP("DGPPR2",$J,DGPNR,0)=X
39 . S ^TMP("DGPPR2",$J,"IEN",DGPNR,^TMP($J,DGPN1))=""
40 . S ^TMP("DGPPR2",$J,"IDX",DGPNR,DGPNR)=""
41 . S DGPNR=DGPNR+1
42 S VALMCNT=DGPNR-1
43 Q
44 ;
45HELP ; -- help code
46 S X="?" D DISP^XQORM1 W !!
47 Q
48 ;
49EXIT ; -- exit code
50 K ^TMP("DGPPR2",$J)
51 K DGPDATA
52 D FULL^VALM1
53 D CLEAN^VALM10
54 Q
55 ;
56EXPND ; -- expand on the selected call log entry
57 ; Variables
58 ; DGPIEN - IEN of selected patient
59 ; DGPCM - Comments from the Call Log, displayed 1 line at a time
60 ; DGPN1-3 - Loacal Var's for $O
61 ;
62 N DGPN1,DGPIEN,DGPN2,DGPN3,DGPCM,VALMI,VALMAT,VALMY
63 ;
64 D FULL^VALM1
65 D EN^VALM2(XQORNOD(0),"S") S VALMI=0
66 I '$D(VALMY) S VALMBCK="R" Q
67 ;
68 S DGPN1="",DGPN2=$O(VALMY(DGPN1))
69 S DGPIEN="",DGPIEN=$O(^TMP("DGPPR2",$J,"IEN",DGPN2,DGPIEN))
70 ;
71 S DGPN3=""
72 F S DGPN3=$O(^DGS(41.43,DGPIEN,1,DGPN3)) Q:DGPN3']"" D
73 . S DGPCM=$G(^DGS(41.43,DGPIEN,1,DGPN3,0))
74 . I DGPCM]"" W !,DGPCM
75 D PAUSE^VALM1
76 Q
77 ;
78INQ ; Entry point for patient Inquiry
79 ;
80 N DGPRFLG
81 S DGPRFLG=1
82 D ^DGRPD
83 Q
84 ;
85PTINQ ; Patient inquiry protocol
86 N DGPN1,DGPN2,DFN,DGPRFLG
87 ;
88 D FULL^VALM1
89 D EN^VALM2(XQORNOD(0),"S") S VALMI=0
90 ;
91 I '$D(VALMY) S VALMBCK="R" Q
92 S DGPN1="",DGPN2=$O(VALMY(DGPN1))
93 S DFN="",DFN=$O(^TMP("DGPRERG",$J,"DFN",DGPN2,DFN))
94 ;
95 ; *** Force check for Sensitive patient
96 S DIC=2,DIC(0)="ENQ",X=DFN D ^DIC K DIC
97 Q:Y<0
98 ;
99 S DGPRFLG=1
100 D EN^DGRPD
101 D PAUSE^VALM1
102 Q
Note: See TracBrowser for help on using the repository browser.