VAFCRPC ;BIR/DLR-RPC ENTRY POINTS ;10/24/02 13:07
;;5.3;Registration;**414,440,474,477,479,1015**;Aug 13, 1993;Build 21
;;Routine uses the following supported IAs #2701 and #3027.
PDAT(RETURN,VALUE,SSN) ;remote pdat display
;'value' will pass in either an icn, ssn, dfn or patient name
N ARRAY,DFN,ICN,NAME,SSN,VAFCSEN
I $O(VALUE(""))="" S VALUE("ICN")=VALUE ;backwards compatibility - sites passing in an icn
S ICN=$G(VALUE("ICN")) ;icn (local or national) passed in from mpi
S NAME=$G(VALUE("NAME")) ;patient name passed in from mpi
S SSN=$G(VALUE("SSN")) ;social security number passed in from mpi
S DFN=$G(VALUE("DFN")) ;patient file ien passed in from mpi
I $G(SSN)'="" S DFN=$O(^DPT("SSN",SSN,0)) I DFN="" S RETURN(1)="-1^Invalid SSN passed into RPC" Q
I $G(ICN)'="" S DFN=$$GETDFN^MPIF001(ICN) I +DFN<0 S RETURN(1)="-1^Invalid ICN passed into RPC" Q ;IA 2701
I $G(NAME)'="" S DFN=$O(^DPT("B",NAME,0)) I DFN="" S RETURN(1)="-1^Invalid NAME passed into RPC" Q
I $S('$G(DFN):1,'$D(^DPT(DFN,0)):1,1:0) S RETURN(1)="-1^Invalid DFN passed into RPC" Q
;log patient sensitivity on receiving system and send msg bulletin
;D NOTICE^DGSEC4(.VAFCSEN,DFN,"RPC - VAFC REMOTE AUDIT FROM THE MPI^Remote Audit Query",3) ;IA #3027
S ARRAY="^TMP(""VAFCHFS"","_$J_")"
D HFS^VAFCHFS("START^VAFCPDAT")
;M RETURN=@ARRAY
D DSPPDAT^VAFCHFS(.RETURN)
K ^TMP("VAFCHFS",$J)
Q
;
AUDIT(RETURN,VALUE,SSN,SDT,EDT) ;remote audit display
;'value' will pass in either an icn, ssn, dfn or patient name
N ARRAY,DFN,ICN,NAME,SSN,VAFCSEN
S ICN=$G(VALUE("ICN")) ;icn (local or national) passed in
S NAME=$G(VALUE("NAME")) ;patient name passed in
S SSN=$G(VALUE("SSN")) ;social security number passed in
S DFN=$G(VALUE("DFN")) ;patient file ien passed in
I $G(SSN)'="" S DFN=$O(^DPT("SSN",SSN,0)) I DFN="" S RETURN(1)="-1^Invalid SSN passed into RPC" Q
I $G(ICN)'="" S DFN=$$GETDFN^MPIF001(ICN) I +DFN<0 S RETURN(1)="-1^Invalid ICN passed into RPC" Q ;IA 2701
I $G(NAME)'="" S DFN=$O(^DPT("B",NAME,0)) I DFN="" S RETURN(1)="-1^Invalid NAME passed into RPC" Q
I $S('$G(DFN):1,'$D(^DPT(DFN,0)):1,1:0) S RETURN(1)="-1^Invalid DFN passed into RPC" Q
;log patient sensitivity on receiving system and send msg bulletin
;D NOTICE^DGSEC4(.VAFCSEN,DFN,"RPC - VAFC REMOTE AUDIT FROM THE MPI^Remote Audit Query",3) ;IA #3027
S ARRAY="^TMP(""VAFCHFS"","_$J_")"
D HFS^VAFCHFS("START^VAFCAUD(DFN,SDT,EDT,1)")
;M RETURN=@ARRAY
D DSPPDAT^VAFCHFS(.RETURN)
K ^TMP("VAFCHFS",$J)
Q
VAFCRPC ;BIR/DLR-RPC ENTRY POINTS ;10/24/02 13:07
+1 ;;5.3;Registration;**414,440,474,477,479,1015**;Aug 13, 1993;Build 21
+2 ;;Routine uses the following supported IAs #2701 and #3027.
PDAT(RETURN,VALUE,SSN) ;remote pdat display
+1 ;'value' will pass in either an icn, ssn, dfn or patient name
+2 NEW ARRAY,DFN,ICN,NAME,SSN,VAFCSEN
+3 ;backwards compatibility - sites passing in an icn
IF $ORDER(VALUE(""))=""
SET VALUE("ICN")=VALUE
+4 ;icn (local or national) passed in from mpi
SET ICN=$GET(VALUE("ICN"))
+5 ;patient name passed in from mpi
SET NAME=$GET(VALUE("NAME"))
+6 ;social security number passed in from mpi
SET SSN=$GET(VALUE("SSN"))
+7 ;patient file ien passed in from mpi
SET DFN=$GET(VALUE("DFN"))
+8 IF $GET(SSN)'=""
SET DFN=$ORDER(^DPT("SSN",SSN,0))
IF DFN=""
SET RETURN(1)="-1^Invalid SSN passed into RPC"
QUIT
+9 ;IA 2701
IF $GET(ICN)'=""
SET DFN=$$GETDFN^MPIF001(ICN)
IF +DFN<0
SET RETURN(1)="-1^Invalid ICN passed into RPC"
QUIT
+10 IF $GET(NAME)'=""
SET DFN=$ORDER(^DPT("B",NAME,0))
IF DFN=""
SET RETURN(1)="-1^Invalid NAME passed into RPC"
QUIT
+11 IF $SELECT('$GET(DFN):1,'$DATA(^DPT(DFN,0)):1,1:0)
SET RETURN(1)="-1^Invalid DFN passed into RPC"
QUIT
+12 ;log patient sensitivity on receiving system and send msg bulletin
+13 ;D NOTICE^DGSEC4(.VAFCSEN,DFN,"RPC - VAFC REMOTE AUDIT FROM THE MPI^Remote Audit Query",3) ;IA #3027
+14 SET ARRAY="^TMP(""VAFCHFS"","_$JOB_")"
+15 DO HFS^VAFCHFS("START^VAFCPDAT")
+16 ;M RETURN=@ARRAY
+17 DO DSPPDAT^VAFCHFS(.RETURN)
+18 KILL ^TMP("VAFCHFS",$JOB)
+19 QUIT
+20 ;
AUDIT(RETURN,VALUE,SSN,SDT,EDT) ;remote audit display
+1 ;'value' will pass in either an icn, ssn, dfn or patient name
+2 NEW ARRAY,DFN,ICN,NAME,SSN,VAFCSEN
+3 ;icn (local or national) passed in
SET ICN=$GET(VALUE("ICN"))
+4 ;patient name passed in
SET NAME=$GET(VALUE("NAME"))
+5 ;social security number passed in
SET SSN=$GET(VALUE("SSN"))
+6 ;patient file ien passed in
SET DFN=$GET(VALUE("DFN"))
+7 IF $GET(SSN)'=""
SET DFN=$ORDER(^DPT("SSN",SSN,0))
IF DFN=""
SET RETURN(1)="-1^Invalid SSN passed into RPC"
QUIT
+8 ;IA 2701
IF $GET(ICN)'=""
SET DFN=$$GETDFN^MPIF001(ICN)
IF +DFN<0
SET RETURN(1)="-1^Invalid ICN passed into RPC"
QUIT
+9 IF $GET(NAME)'=""
SET DFN=$ORDER(^DPT("B",NAME,0))
IF DFN=""
SET RETURN(1)="-1^Invalid NAME passed into RPC"
QUIT
+10 IF $SELECT('$GET(DFN):1,'$DATA(^DPT(DFN,0)):1,1:0)
SET RETURN(1)="-1^Invalid DFN passed into RPC"
QUIT
+11 ;log patient sensitivity on receiving system and send msg bulletin
+12 ;D NOTICE^DGSEC4(.VAFCSEN,DFN,"RPC - VAFC REMOTE AUDIT FROM THE MPI^Remote Audit Query",3) ;IA #3027
+13 SET ARRAY="^TMP(""VAFCHFS"","_$JOB_")"
+14 DO HFS^VAFCHFS("START^VAFCAUD(DFN,SDT,EDT,1)")
+15 ;M RETURN=@ARRAY
+16 DO DSPPDAT^VAFCHFS(.RETURN)
+17 KILL ^TMP("VAFCHFS",$JOB)
+18 QUIT