ANRVJ1 ;HOIFO/CED - BR utility ;Jun 13,2006
;;5.0;BLIND REHABILITATION;**1**;Jun 02, 2006;Build 11
; This routine contains calls to VistA for
; use until services are available.
;
; Integration Agreements Utilized:
; GETDFN^MPIF001 #2701
;
GETDFN ; [Procedure] Return the DFN given a ICN
N DFN
S DFN=VAL1
S @RESULTS@(0)=$$GETDFN^MPIF001(DFN)
Q
;
GETPAR ; [Procedure] Return external value for parameter
N ENT,PAR,INST,VER
S ENT="SYS"
S PAR=VAL1
S INST=DATA
S VER=$$GET^XPAR(ENT,PAR,INST,"B")
I VER="" S VER="0^NO"
S @RESULTS@(0)=VER
Q
;
RPC(RESULTS,OPTION,VAL1,DATA) ; [Procedure] Main RPC Entry
S RESULTS=$NA(^TMP($J)) K @RESULTS
D:$T(@OPTION)]"" @OPTION
D:'$D(@RESULTS)
.S @RESULTS@(0)="0^No results returned"
D CLEAN^DILF
Q
;
SELUSR ; [Procedure] Return a selected user
; This is being replaced by Kernel
; IEN is the selected users Internal Entry Number
N IEN
S IEN=VAL1
S @RESULTS@(0)=IEN_U
S @RESULTS@(1)=$$GET1^DIQ(200,IEN_",",.01)_U ; Name
S @RESULTS@(2)=$$GET1^DIQ(200,IEN_",",8)_U ; Title
Q
;
LISTUS ; [Procedure]Return a user list
; This is being replaced by Kernel
N I,IEN,Y
D FIND^DIC(200,"","","M",VAL1)
S I=0,Y=""
F S I=$O(^TMP("DILIST",$J,1,I)) Q:'I D
. S IEN=^TMP("DILIST",$J,2,I)
. S @RESULTS@(I)=^TMP("DILIST",$J,2,I)_U_^TMP("DILIST",$J,1,I)_"~"
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HANRVJ1 1378 printed Sep 02, 2024@19:30:43 Page 2
ANRVJ1 ;HOIFO/CED - BR utility ;Jun 13,2006
+1 ;;5.0;BLIND REHABILITATION;**1**;Jun 02, 2006;Build 11
+2 ; This routine contains calls to VistA for
+3 ; use until services are available.
+4 ;
+5 ; Integration Agreements Utilized:
+6 ; GETDFN^MPIF001 #2701
+7 ;
GETDFN ; [Procedure] Return the DFN given a ICN
+1 NEW DFN
+2 SET DFN=VAL1
+3 SET @RESULTS@(0)=$$GETDFN^MPIF001(DFN)
+4 QUIT
+5 ;
GETPAR ; [Procedure] Return external value for parameter
+1 NEW ENT,PAR,INST,VER
+2 SET ENT="SYS"
+3 SET PAR=VAL1
+4 SET INST=DATA
+5 SET VER=$$GET^XPAR(ENT,PAR,INST,"B")
+6 IF VER=""
SET VER="0^NO"
+7 SET @RESULTS@(0)=VER
+8 QUIT
+9 ;
RPC(RESULTS,OPTION,VAL1,DATA) ; [Procedure] Main RPC Entry
+1 SET RESULTS=$NAME(^TMP($JOB))
KILL @RESULTS
+2 if $TEXT(@OPTION)]""
DO @OPTION
+3 if '$DATA(@RESULTS)
Begin DoDot:1
+4 SET @RESULTS@(0)="0^No results returned"
End DoDot:1
+5 DO CLEAN^DILF
+6 QUIT
+7 ;
SELUSR ; [Procedure] Return a selected user
+1 ; This is being replaced by Kernel
+2 ; IEN is the selected users Internal Entry Number
+3 NEW IEN
+4 SET IEN=VAL1
+5 SET @RESULTS@(0)=IEN_U
+6 ; Name
SET @RESULTS@(1)=$$GET1^DIQ(200,IEN_",",.01)_U
+7 ; Title
SET @RESULTS@(2)=$$GET1^DIQ(200,IEN_",",8)_U
+8 QUIT
+9 ;
LISTUS ; [Procedure]Return a user list
+1 ; This is being replaced by Kernel
+2 NEW I,IEN,Y
+3 DO FIND^DIC(200,"","","M",VAL1)
+4 SET I=0
SET Y=""
+5 FOR
SET I=$ORDER(^TMP("DILIST",$JOB,1,I))
if 'I
QUIT
Begin DoDot:1
+6 SET IEN=^TMP("DILIST",$JOB,2,I)
+7 SET @RESULTS@(I)=^TMP("DILIST",$JOB,2,I)_U_^TMP("DILIST",$JOB,1,I)_"~"
End DoDot:1
+8 QUIT
+9 ;