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

PXUTLVST.m

Go to the documentation of this file.
  1. PXUTLVST ;ISL/dee - Looks up the visit to see if there is already one ;8/6/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
  1. Q
  1. ;
  1. LOOKVSIT(PAT,VDT,LOC,DSS,INS,TYP) ;Calls visit tracking to see if there is already a visit.
  1. ;Get the visit for the appointment is there is one
  1. N APPTVST
  1. S APPTVST=$$APPT2VST^PXUTL1(PAT,VDT,LOC)
  1. I APPTVST>0 Q APPTVST
  1. ;
  1. N VSIT,VSITPKG
  1. S VSIT("IEN")=""
  1. S VSIT("VDT")=VDT
  1. S VSIT("PAT")=PAT
  1. S VSIT("LOC")=LOC
  1. S VSIT("INS")=$G(INS)
  1. S VSIT("TYP")=$G(TYP)
  1. S VSIT("DSS")=$G(DSS)
  1. I VSIT("DSS")="",$P($G(^SC(+VSIT("LOC"),0)),"^",7)>0 S VSIT("DSS")=$P(^SC(+VSIT("LOC"),0),"^",7)
  1. S VSITPKG="PX"
  1. S VSIT(0)="D0EM"
  1. ;
  1. ;CALL FOR VSIT
  1. D ^VSIT
  1. I '$D(VSIT("IEN"))#2 Q -1
  1. Q $P(VSIT("IEN"),"^",1)
  1. ;