source: WorldVistAEHR/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECUURPC.m@ 623

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

revised back to 6/30/08 version

File size: 2.6 KB
Line 
1ECUURPC ;ALB/JAM;Event Capture Data Entry Broker Utilities ;Aug 28, 2000
2 ;;2.0; EVENT CAPTURE ;**25,42,49**;8 May 96
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 D ^DIC I Y=-1 Q
36 S RESULTS=+Y
37 Q
38ECDATE(RESULTS,ECARY) ;
39 ;
40 ;Broker call returns an Fileman internal date
41 ; RPC: EC GETDATE
42 ;INPUTS ECARY - Contains the following elements
43 ; DTSTR - Date String
44 ; FLG - Date Flag (optional)
45 ;
46 ;OUTPUTS RESULTS - A valid Fileman date format^External format
47 ;
48 N ECDTSTR,DIC,X,Y,DTSTR,FLG
49 D SETENV^ECUMRPC
50 S DTSTR=$P(ECARY,U),FLG=$P(ECARY,U,2) I DTSTR="" Q
51 S X=DTSTR,%DT="XT"_$S(FLG="R":"R",1:""),%DT(0)="-NOW" D ^%DT
52 I +Y<1 S RESULTS="0^Invalid Date/Time" Q
53 S RESULTS=Y D D^DIQ
54 S RESULTS=RESULTS_U_Y
55 Q
56PATCH(RESULTS,ECARY) ;
57 ;
58 ;Broker call returns 1 if patch X is installed
59 ; RPC: EC GETPATCH
60 ;INPUTS ECARY - contains the patch number
61 ;
62 ;OUTPUTS RESULTS 1 OR 0
63 ;
64 I ECARY="" Q
65 D SETENV^ECUMRPC
66 S RESULTS=$$PATCH^XPDUTL(ECARY)
67 Q
68VERSRV(RESULTS,ECARY,VERSION) ; Return server version of option name and
69 ; minimum GUI client version.
70 ;
71 ;Server/client version consist of 4 pieces, namely
72 ; major version.minor version.release.build (ex. 2.0.10.1)
73 ;
74 ;Broker call returns server version of option name
75 ; RPC: EC GETVERSION
76 ;INPUTS ECARY - contains the option name
77 ; VERSION - EC GUI client version ;stay in partition for session
78 ;
79 ;OUTPUTS RESULTS version number OR null ("")
80 ; current server version^minimum client version
81 ;
82 S ECCLVER=$G(VERSION)
83 I $G(ECARY)="" Q
84 N ECLST,ECMINV
85 S ECMINV="2.0.10.1" ; Minimum version of EC GUI client
86 D FIND^DIC(19,"",1,"X",ECARY,1,,,,"ECLST")
87 I 'ECLST("DILIST",0) S RESULTS="" Q
88 S RESULTS=ECLST("DILIST","ID",1,1)
89 S RESULTS=$P(RESULTS,"version ",2)_U_ECMINV
90 Q
Note: See TracBrowser for help on using the repository browser.