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

VSIT0.m

Go to the documentation of this file.
  1. VSIT0 ;ISL/JVS,dee - Front End Check to Visit Tracking ;03/29/2018
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**76,211**;Aug 12, 1996;Build 454
  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. Q
  1. ;
  1. ;
  1. GETPKG(VSITPKG) ;Pass in package name space and returns a pointer
  1. ;to that package in the Visit Tracking Parameters file.
  1. N VSITIEN,VSITPIEN
  1. S VSITPIEN=$$PKG2IEN($G(VSITPKG))
  1. Q:VSITPIEN<1 -1
  1. S VSITIEN=""
  1. S VSITIEN=$O(^DIC(150.9,1,3,"B",VSITPIEN,VSITIEN)) ;Parameter file IEN
  1. Q $S(VSITIEN<1:-1,1:VSITIEN)
  1. ;
  1. ACTIVE(VSITPKGP) ;Pass pointer to that package in the Visit Tracking
  1. ; Parameters file and returns active flag.
  1. Q $P($G(^DIC(150.9,1,3,+VSITPKGP,3)),U,1)
  1. ;
  1. PKG2IEN(VSITPKG) ;VSITPKG can be the name, prefix, or pointer.
  1. I $G(VSITPKG)="" Q -1
  1. N IEN,MSG
  1. S IEN=$$FIND1^DIC(9.4,,"AMX",VSITPKG,"","","MSG")
  1. Q $S(IEN=0:-1,1:IEN)
  1. ;
  1. PKG(PKG,VALUE) ; -- Install package into multiple and add active flag
  1. I PKG=""!(VALUE="") Q -1
  1. N X,Y,DA,DIC,DIE,DR
  1. S X=PKG
  1. S DA(1)=1,DIC="^DIC(150.9,1,3,",DIC(0)="MXL",DIC("P")="150.93P"
  1. S DLAYGO=150.9
  1. D ^DIC
  1. I Y=-1 Q -1
  1. S DIE=DIC
  1. K DA
  1. S DA=+Y
  1. S DR="4///^S X=VALUE"
  1. D ^DIE
  1. Q 1_"^"_$P($G(^DIC(150.9,1,3,DA,3)),"^",1)
  1. ;
  1. PKGON(PKG) ; -- Check value of ACTIVE FLAG
  1. I PKG="" Q -1
  1. N X,Y,DA,DIC
  1. S X=PKG
  1. S DA(1)=1
  1. S DIC="^DIC(150.9,1,3,"
  1. S DIC(0)="MX"
  1. S DIC("P")="150.93P"
  1. D ^DIC
  1. I Y=-1 Q -1
  1. Q $P($G(^DIC(150.9,1,3,+Y,3)),"^",1)
  1. ;