VSITCK ;ISD/RJP - Visit Field Check ;6/20/96
;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
; the incorporation of the module into PCE. For historical reference,
; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
; patches.
;
;;2.0;VISIT TRACKING;;Aug 12, 1996;
;
Q ; - not an entry point
;
ERRCHK(NODE,VALUE,DATEFMT) ;Checks the value to see if it is valid
;Returns:
; value if it is valid
; null in the first piece if it is not valid
; and the error message form VSITFLD if there is one
;
S NODE=$G(NODE)
S VALUE=$G(VALUE)
N ERR
I $P($G(^TMP("VSITDD",$J,NODE)),";",5)]"" S ERR="^"_$P(^TMP("VSITDD",$J,NODE),";",1)_"^"_VALUE_"^"_$P(^TMP("VSITDD",$J,NODE),";",5)
E S ERR=""
S VALUE=$G(VALUE)
S:VALUE]"" VALUE=$$GET^VSITVAR(NODE,VALUE,"",$G(DATEFMT))
S:VALUE']"" VALUE=ERR
Q VALUE
;
SETALL ;Do $GET on all of the nodes of the VSIT array
N FLDINDX
S FLDINDX=""
F S FLDINDX=$O(^TMP("VSITDD",$J,FLDINDX)) Q:FLDINDX="" D
. S VSIT(FLDINDX)=$G(VSIT(FLDINDX))
S VSIT(0)=$G(VSIT(0))
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVSITCK 1155 printed Dec 13, 2024@02:32:27 Page 2
VSITCK ;ISD/RJP - Visit Field Check ;6/20/96
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
+2 ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
+3 ; the incorporation of the module into PCE. For historical reference,
+4 ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
+5 ; patches.
+6 ;
+7 ;;2.0;VISIT TRACKING;;Aug 12, 1996;
+8 ;
+9 ; - not an entry point
QUIT
+10 ;
ERRCHK(NODE,VALUE,DATEFMT) ;Checks the value to see if it is valid
+1 ;Returns:
+2 ; value if it is valid
+3 ; null in the first piece if it is not valid
+4 ; and the error message form VSITFLD if there is one
+5 ;
+6 SET NODE=$GET(NODE)
+7 SET VALUE=$GET(VALUE)
+8 NEW ERR
+9 IF $PIECE($GET(^TMP("VSITDD",$JOB,NODE)),";",5)]""
SET ERR="^"_$PIECE(^TMP("VSITDD",$JOB,NODE),";",1)_"^"_VALUE_"^"_$PIECE(^TMP("VSITDD",$JOB,NODE),";",5)
+10 IF '$TEST
SET ERR=""
+11 SET VALUE=$GET(VALUE)
+12 if VALUE]""
SET VALUE=$$GET^VSITVAR(NODE,VALUE,"",$GET(DATEFMT))
+13 if VALUE']""
SET VALUE=ERR
+14 QUIT VALUE
+15 ;
SETALL ;Do $GET on all of the nodes of the VSIT array
+1 NEW FLDINDX
+2 SET FLDINDX=""
+3 FOR
SET FLDINDX=$ORDER(^TMP("VSITDD",$JOB,FLDINDX))
if FLDINDX=""
QUIT
Begin DoDot:1
+4 SET VSIT(FLDINDX)=$GET(VSIT(FLDINDX))
End DoDot:1
+5 SET VSIT(0)=$GET(VSIT(0))
+6 QUIT
+7 ;