GMVRPCU ; HOIFO/DP - RPC for Vitals User ;3/18/04 12:49
;;5.0;GEN. MED. REC. - VITALS;**3**;Oct 31, 2002
; Integration Agreements:
; IA# 10076 [Supported] XUSEC Calls
; IA# 2263 [Supported] XPAR Calls
; IA# 2541 [Supported] XUPARAM Calls
; IA# 10112 [Supported] VASITE calls
;
; This routine supports the following IAs:
; #4366 - GMV USER RPC is called at RPC (private)
;
RPC(RESULTS,OPTION,DATA) ; [Procedure] Main RPC call tag
; RPC: [GMV USER]
;
; Input parameters
; 1. RESULTS [Reference/Required] RPC Return array
; 2. OPTION [Literal/Required] RPC Option to execute
; 3. DATA [Literal/Required] Other data as required for call
;
N GMV,GMVCAT,GMVDESC,GMVENT,GMVERR,GMVFDA,GMVFLD,GMVIEN,GMVIT,GMVNAM,GMVNAME,GMVNEW,GMVOLD,GMVOWN,GMVOWNER,GMVQUAL,GMVROOT,GMVTYPE,GMVVAL,GMVVIT,GMVSCRN
S RESULTS=$NA(^TMP("GMVUSER",$J)) K @RESULTS
D:$T(@OPTION)]"" @OPTION
S:'$D(@RESULTS) @RESULTS@(0)="-1^No results returned"
D CLEAN^DILF
Q
;
SETPAR ; [Procedure] Set/Clear Parameter
I $P(DATA,U,2)="" D Q
.D DEL^XPAR("USR","GMV USER DEFAULTS",$P(DATA,U,1),.GMVERR)
.I '$G(GMVERR) S @RESULTS@(0)="1^Parameter cleared"
.E S @RESULTS@(0)="-1^"_GMVERR
D EN^XPAR("USR","GMV USER DEFAULTS",$P(DATA,U,1),$P(DATA,U,2),.GMVERR)
I '$G(GMVERR) S @RESULTS@(0)="1^Parameter set."
E S @RESULTS@(0)="-1^"_GMVERR
Q
;
GETPAR ; [Procedure] Get Parameter
S @RESULTS@(0)=$$GET^XPAR("USR","GMV USER DEFAULTS",DATA,"Q")
Q
;
SIGNON ; [Procedure] Returns sign-on information after Broker.Connected := True
S @RESULTS@(0)=DUZ
S @RESULTS@(1)=$$GET1^DIQ(200,DUZ_",",.01) ; Name
S @RESULTS@(2)=+$$FIND1^DIC(4.2,"","QX",$$KSP^XUPARAM("WHERE")) ;Domain
S @RESULTS@(3)=$$KSP^XUPARAM("WHERE") ; Domain Name
S @RESULTS@(4)=+$G(DUZ(2)) ; Division IEN
S @RESULTS@(5)=$S(+$G(DUZ(2)):$$GET1^DIQ(4,DUZ(2)_",",.01),1:"UNKNOWN")
S @RESULTS@(6)=($D(^XUSEC("GMV MANAGER",DUZ))#2)!(DUZ(0)="@")
S @RESULTS@(7)=$$GET1^DIQ(200,DUZ_",",8)
S @RESULTS@(8)=""
S @RESULTS@(9)=$G(DTIME,300)
S @RESULTS@(10)=$$SITE^VASITE()
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVRPCU 2072 printed Oct 16, 2024@18:00:32 Page 2
GMVRPCU ; HOIFO/DP - RPC for Vitals User ;3/18/04 12:49
+1 ;;5.0;GEN. MED. REC. - VITALS;**3**;Oct 31, 2002
+2 ; Integration Agreements:
+3 ; IA# 10076 [Supported] XUSEC Calls
+4 ; IA# 2263 [Supported] XPAR Calls
+5 ; IA# 2541 [Supported] XUPARAM Calls
+6 ; IA# 10112 [Supported] VASITE calls
+7 ;
+8 ; This routine supports the following IAs:
+9 ; #4366 - GMV USER RPC is called at RPC (private)
+10 ;
RPC(RESULTS,OPTION,DATA) ; [Procedure] Main RPC call tag
+1 ; RPC: [GMV USER]
+2 ;
+3 ; Input parameters
+4 ; 1. RESULTS [Reference/Required] RPC Return array
+5 ; 2. OPTION [Literal/Required] RPC Option to execute
+6 ; 3. DATA [Literal/Required] Other data as required for call
+7 ;
+8 NEW GMV,GMVCAT,GMVDESC,GMVENT,GMVERR,GMVFDA,GMVFLD,GMVIEN,GMVIT,GMVNAM,GMVNAME,GMVNEW,GMVOLD,GMVOWN,GMVOWNER,GMVQUAL,GMVROOT,GMVTYPE,GMVVAL,GMVVIT,GMVSCRN
+9 SET RESULTS=$NAME(^TMP("GMVUSER",$JOB))
KILL @RESULTS
+10 if $TEXT(@OPTION)]""
DO @OPTION
+11 if '$DATA(@RESULTS)
SET @RESULTS@(0)="-1^No results returned"
+12 DO CLEAN^DILF
+13 QUIT
+14 ;
SETPAR ; [Procedure] Set/Clear Parameter
+1 IF $PIECE(DATA,U,2)=""
Begin DoDot:1
+2 DO DEL^XPAR("USR","GMV USER DEFAULTS",$PIECE(DATA,U,1),.GMVERR)
+3 IF '$GET(GMVERR)
SET @RESULTS@(0)="1^Parameter cleared"
+4 IF '$TEST
SET @RESULTS@(0)="-1^"_GMVERR
End DoDot:1
QUIT
+5 DO EN^XPAR("USR","GMV USER DEFAULTS",$PIECE(DATA,U,1),$PIECE(DATA,U,2),.GMVERR)
+6 IF '$GET(GMVERR)
SET @RESULTS@(0)="1^Parameter set."
+7 IF '$TEST
SET @RESULTS@(0)="-1^"_GMVERR
+8 QUIT
+9 ;
GETPAR ; [Procedure] Get Parameter
+1 SET @RESULTS@(0)=$$GET^XPAR("USR","GMV USER DEFAULTS",DATA,"Q")
+2 QUIT
+3 ;
SIGNON ; [Procedure] Returns sign-on information after Broker.Connected := True
+1 SET @RESULTS@(0)=DUZ
+2 ; Name
SET @RESULTS@(1)=$$GET1^DIQ(200,DUZ_",",.01)
+3 ;Domain
SET @RESULTS@(2)=+$$FIND1^DIC(4.2,"","QX",$$KSP^XUPARAM("WHERE"))
+4 ; Domain Name
SET @RESULTS@(3)=$$KSP^XUPARAM("WHERE")
+5 ; Division IEN
SET @RESULTS@(4)=+$GET(DUZ(2))
+6 SET @RESULTS@(5)=$SELECT(+$GET(DUZ(2)):$$GET1^DIQ(4,DUZ(2)_",",.01),1:"UNKNOWN")
+7 SET @RESULTS@(6)=($DATA(^XUSEC("GMV MANAGER",DUZ))#2)!(DUZ(0)="@")
+8 SET @RESULTS@(7)=$$GET1^DIQ(200,DUZ_",",8)
+9 SET @RESULTS@(8)=""
+10 SET @RESULTS@(9)=$GET(DTIME,300)
+11 SET @RESULTS@(10)=$$SITE^VASITE()
+12 QUIT
+13 ;