VAFCRPC ;BIR/DLR-RPC ENTRY POINTS ; 8/11/10 6:18pm
;;5.3;Registration;**414,440,474,477,479,825,981**;Aug 13, 1993;Build 1
;;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
AAUPD(RETURN,ARRAA) ;Assigning authority update
;RPC: VAFC AA UPDATE
S RETURN=$$ADD^VAFCAAUT(.ARRAA,.ERR)
Q
;
;**128, Story 951754 (jfw) - Maintain EHRM MIGRATED FACILITIES File #391.919
;Input: ARRCRNR - List of Sites that have migrated to CERNER.
; ie. ARRCRN(<Station#>)=""
; ARRCRN(<Station#>)=""
; etc..
;Output: 1 if successful else ERROR CODE ^ ERROR MESSAGE
UPDMFAC(RETURN,ARRCRNR) ;Update EHRM MIGRATED FACILITIES (#391.919) file
;RPC: VAFC MVI MGRTD FACILITIES UPDT
;MVI will remotely update the EHRM MIGRATED FACILITIES (#391.919) file
;with sites that have Migrated to using the CERNER application.
D UPDT^VAFCCRNR(.ARRCRNR,.RETURN)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAFCRPC 3220 printed Dec 13, 2024@03:02:23 Page 2
VAFCRPC ;BIR/DLR-RPC ENTRY POINTS ; 8/11/10 6:18pm
+1 ;;5.3;Registration;**414,440,474,477,479,825,981**;Aug 13, 1993;Build 1
+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
AAUPD(RETURN,ARRAA) ;Assigning authority update
+1 ;RPC: VAFC AA UPDATE
+2 SET RETURN=$$ADD^VAFCAAUT(.ARRAA,.ERR)
+3 QUIT
+4 ;
+5 ;**128, Story 951754 (jfw) - Maintain EHRM MIGRATED FACILITIES File #391.919
+6 ;Input: ARRCRNR - List of Sites that have migrated to CERNER.
+7 ; ie. ARRCRN(<Station#>)=""
+8 ; ARRCRN(<Station#>)=""
+9 ; etc..
+10 ;Output: 1 if successful else ERROR CODE ^ ERROR MESSAGE
UPDMFAC(RETURN,ARRCRNR) ;Update EHRM MIGRATED FACILITIES (#391.919) file
+1 ;RPC: VAFC MVI MGRTD FACILITIES UPDT
+2 ;MVI will remotely update the EHRM MIGRATED FACILITIES (#391.919) file
+3 ;with sites that have Migrated to using the CERNER application.
+4 DO UPDT^VAFCCRNR(.ARRCRNR,.RETURN)
+5 QUIT