source: FOIAVistA/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECUURPC.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1ECUURPC ;ALB/JAM;Event Capture Data Entry Broker Utilities ;Aug 28, 2000
2 ;;2.0; EVENT CAPTURE ;**25,42,49,94**;8 May 96;Build 4
3 ;
4ECHELP(RESULTS,ECARY) ;
5 ;
6 ;Broker call returns the entries from HELP FILE #9.2
7 ; RPC: EC GETSCNHELP
8 ;INPUTS ECARY - Contains the following elements
9 ; HLPDA - Help Frame Name
10 ;
11 ;OUTPUTS RESULTS - Array of help text in the HELP FRAM File (#9.2)
12 ;
13 N HLPDA,DIC,X,Y
14 S HLPDA=$G(ECARY) I HLPDA="" Q
15 D SETENV^ECUMRPC K ^TMP($J,"ECHELP")
16 S DIC="^DIC(9.2,",DIC(0)="MN",X=HLPDA
17 D ^DIC M ^TMP($J,"ECHELP")=^DIC(9.2,+Y,1)
18 I $D(^TMP($J,"ECHELP")) D
19 . S $P(^TMP($J,"ECHELP",0),U)=$P(^DIC(9.2,+Y,0),U,2)
20 S RESULTS=$NA(^TMP($J,"ECHELP"))
21 Q
22FNDIEN(RESULTS,ECARY) ;find IEN
23 ;Broker call returns the IEN from a file
24 ; RPC: EC GETIEN
25 ;INPUTS ECARY - Contains the following data elements
26 ; FIL - File number
27 ; TXT - .01 description
28 ;
29 ;OUTPUTS RESULTS - File IEN
30 ;
31 N TXT,FIL,DIC,X,Y
32 D SETENV^ECUMRPC
33 S FIL=$P(ECARY,U),TXT=$P(ECARY,U,2) I TXT=""!(FIL="") Q
34 S DIC=FIL,DIC(0)="MN",X=TXT
35 I FIL=81.3 S DIC("S")="I $P(^DIC(81.3,Y,0),U,5)'=1" ;PATCH 94
36 D ^DIC I Y=-1 Q
37 S RESULTS=+Y
38 Q
39ECDATE(RESULTS,ECARY) ;
40 ;
41 ;Broker call returns an Fileman internal date
42 ; RPC: EC GETDATE
43 ;INPUTS ECARY - Contains the following elements
44 ; DTSTR - Date String
45 ; FLG - Date Flag (optional)
46 ;
47 ;OUTPUTS RESULTS - A valid Fileman date format^External format
48 ;
49 N ECDTSTR,DIC,X,Y,DTSTR,FLG
50 D SETENV^ECUMRPC
51 S DTSTR=$P(ECARY,U),FLG=$P(ECARY,U,2) I DTSTR="" Q
52 S X=DTSTR,%DT="XT"_$S(FLG="R":"R",1:""),%DT(0)="-NOW" D ^%DT
53 I +Y<1 S RESULTS="0^Invalid Date/Time" Q
54 S RESULTS=Y D D^DIQ
55 S RESULTS=RESULTS_U_Y
56 Q
57PATCH(RESULTS,ECARY) ;
58 ;
59 ;Broker call returns 1 if patch X is installed
60 ; RPC: EC GETPATCH
61 ;INPUTS ECARY - contains the patch number
62 ;
63 ;OUTPUTS RESULTS 1 OR 0
64 ;
65 I ECARY="" Q
66 D SETENV^ECUMRPC
67 S RESULTS=$$PATCH^XPDUTL(ECARY)
68 Q
69VERSRV(RESULTS,ECARY,VERSION) ; Return server version of option name and
70 ; minimum GUI client version.
71 ;
72 ;Server/client version consist of 4 pieces, namely
73 ; major version.minor version.release.build (ex. 2.0.10.1)
74 ;
75 ;Broker call returns server version of option name
76 ; RPC: EC GETVERSION
77 ;INPUTS ECARY - contains the option name
78 ; VERSION - EC GUI client version ;stay in partition for session
79 ;
80 ;OUTPUTS RESULTS version number OR null ("")
81 ; current server version^minimum client version
82 ;
83 S ECCLVER=$G(VERSION)
84 I $G(ECARY)="" Q
85 N ECLST,ECMINV
86 S ECMINV="2.0.10.1" ; Minimum version of EC GUI client
87 D FIND^DIC(19,"",1,"X",ECARY,1,,,,"ECLST")
88 I 'ECLST("DILIST",0) S RESULTS="" Q
89 S RESULTS=ECLST("DILIST","ID",1,1)
90 S RESULTS=$P(RESULTS,"version ",2)_U_ECMINV
91 Q
Note: See TracBrowser for help on using the repository browser.