VPRSR ;SLC/MKB -- Surgery interface ;10/25/18 15:29
;;1.0;VIRTUAL PATIENT RECORD;**8,10,15,17,20,30**;Sep 01, 2011;Build 9
;;Per VA Directive 6402, this routine should not be modified.
;
; Supported by DBIA #4750
;
; External References DBIA#
; ------------------- -----
; ^SRF 5675
; DIQ 2056
; SROESTV 3533
;
; ---------------- Update Triggers ----------------
;
; NOT IN USE: Surgery updates now triggered via TIU
; (only completed procedures w/visit)
;
NEW(IEN,DFN,STS) ; -- new surgery request [from SROERR]
Q ;don't want until completed
S IEN=+$G(IEN),DFN=+$G(DFN) Q:DFN<1
D POST^VPRHS(DFN,"Procedure",IEN_";130")
Q
;
UPD(IEN,DFN,STS) ; -- updated surgery request [from SROERR0]
Q ;hit too often, now trigger off the TIU document event
S IEN=+$G(IEN),DFN=+$G(DFN) Q:DFN<1 Q:$G(STS)'["COMPLETED"
N VPRSR,I,SRDOC,VST
D ONE^SROESTV("VPRSR",IEN)
S I=+$O(VPRSR(IEN,0)),SRDOC=+$G(VPRSR(IEN,I)) Q:'SRDOC
S VST=$$GET1^DIQ(8925,SRDOC,.03,"I")
D:VST POST^VPRHS(DFN,"Procedure",IEN_";130",,VST)
Q
;
DEL(IEN,DFN) ; -- delete surgery request [from SROERR]
Q ;not used (only saving completed procedures)
S IEN=+$G(IEN),DFN=+$G(DFN) Q:DFN<1
D POST^VPRHS(DFN,"Procedure",IEN_";130","@")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVPRSR 1359 printed Dec 13, 2024@02:46:04 Page 2
VPRSR ;SLC/MKB -- Surgery interface ;10/25/18 15:29
+1 ;;1.0;VIRTUAL PATIENT RECORD;**8,10,15,17,20,30**;Sep 01, 2011;Build 9
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ; Supported by DBIA #4750
+5 ;
+6 ; External References DBIA#
+7 ; ------------------- -----
+8 ; ^SRF 5675
+9 ; DIQ 2056
+10 ; SROESTV 3533
+11 ;
+12 ; ---------------- Update Triggers ----------------
+13 ;
+14 ; NOT IN USE: Surgery updates now triggered via TIU
+15 ; (only completed procedures w/visit)
+16 ;
NEW(IEN,DFN,STS) ; -- new surgery request [from SROERR]
+1 ;don't want until completed
QUIT
+2 SET IEN=+$GET(IEN)
SET DFN=+$GET(DFN)
if DFN<1
QUIT
+3 DO POST^VPRHS(DFN,"Procedure",IEN_";130")
+4 QUIT
+5 ;
UPD(IEN,DFN,STS) ; -- updated surgery request [from SROERR0]
+1 ;hit too often, now trigger off the TIU document event
QUIT
+2 SET IEN=+$GET(IEN)
SET DFN=+$GET(DFN)
if DFN<1
QUIT
if $GET(STS)'["COMPLETED"
QUIT
+3 NEW VPRSR,I,SRDOC,VST
+4 DO ONE^SROESTV("VPRSR",IEN)
+5 SET I=+$ORDER(VPRSR(IEN,0))
SET SRDOC=+$GET(VPRSR(IEN,I))
if 'SRDOC
QUIT
+6 SET VST=$$GET1^DIQ(8925,SRDOC,.03,"I")
+7 if VST
DO POST^VPRHS(DFN,"Procedure",IEN_";130",,VST)
+8 QUIT
+9 ;
DEL(IEN,DFN) ; -- delete surgery request [from SROERR]
+1 ;not used (only saving completed procedures)
QUIT
+2 SET IEN=+$GET(IEN)
SET DFN=+$GET(DFN)
if DFN<1
QUIT
+3 DO POST^VPRHS(DFN,"Procedure",IEN_";130","@")
+4 QUIT