Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VSITCK

VSITCK.m

Go to the documentation of this file.
  1. VSITCK ;ISD/RJP - Visit Field Check ;6/20/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
  1. ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
  1. ; the incorporation of the module into PCE. For historical reference,
  1. ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
  1. ; patches.
  1. ;
  1. ;;2.0;VISIT TRACKING;;Aug 12, 1996;
  1. ;
  1. Q ; - not an entry point
  1. ;
  1. ERRCHK(NODE,VALUE,DATEFMT) ;Checks the value to see if it is valid
  1. ;Returns:
  1. ; value if it is valid
  1. ; null in the first piece if it is not valid
  1. ; and the error message form VSITFLD if there is one
  1. ;
  1. S NODE=$G(NODE)
  1. S VALUE=$G(VALUE)
  1. N ERR
  1. I $P($G(^TMP("VSITDD",$J,NODE)),";",5)]"" S ERR="^"_$P(^TMP("VSITDD",$J,NODE),";",1)_"^"_VALUE_"^"_$P(^TMP("VSITDD",$J,NODE),";",5)
  1. E S ERR=""
  1. S VALUE=$G(VALUE)
  1. S:VALUE]"" VALUE=$$GET^VSITVAR(NODE,VALUE,"",$G(DATEFMT))
  1. S:VALUE']"" VALUE=ERR
  1. Q VALUE
  1. ;
  1. SETALL ;Do $GET on all of the nodes of the VSIT array
  1. N FLDINDX
  1. S FLDINDX=""
  1. F S FLDINDX=$O(^TMP("VSITDD",$J,FLDINDX)) Q:FLDINDX="" D
  1. . S VSIT(FLDINDX)=$G(VSIT(FLDINDX))
  1. S VSIT(0)=$G(VSIT(0))
  1. Q
  1. ;