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

VSITCK1.m

Go to the documentation of this file.
  1. VSITCK1 ;ISD/RJP - Visit Field Check (continued) ;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. IP(VDT,PAT) ; - check inpatient status
  1. ;
  1. ; - rtns <ien of patient movement>
  1. ;
  1. N VADMVT,VAINDT,VAERR
  1. N IPM,DFN
  1. S VDT=$G(VDT),PAT=$G(PAT)
  1. S VAINDT=VDT,DFN=+$G(PAT) D ADM^VADPT2
  1. S IPM=$S(+VADMVT>0:+VADMVT,1:"")
  1. ; - dom pt is not an inpatient (from ^SDAM2)
  1. I $P(^DG(43,1,0),"^",21),$P($G(^DIC(42,+$P($G(^DGPM(+VADMVT,0)),"^",6),0)),"^",3)="D" S IPM=""
  1. Q IPM
  1. ;
  1. INS4LOC(LOC) ; - Get Institution for a given Location
  1. ;
  1. N INS S LOC=$G(LOC),INS=""
  1. D:+LOC
  1. . S INS=$P(^SC(LOC,0),"^",15)
  1. . S:+INS INS=$P($G(^DG(40.8,INS,0)),"^",7)
  1. . S INS=$S(+INS&$D(^DIC(4,+INS,0)):INS,1:"")
  1. Q INS
  1. ;
  1. DSS4LOC(LOC) ; - Get Clinic Stop Code for a given Location
  1. ;
  1. N DSS S LOC=$G(LOC),DSS=""
  1. D:+LOC
  1. . S DSS=$P($G(^SC(LOC,0)),"^",7) S:DSS'=+DSS DSS=""
  1. Q DSS
  1. ;