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

PXCENEW.m

Go to the documentation of this file.
  1. PXCENEW ;ISL/dee - Used to change the screening on the display of visit and appointments ;12/17/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**14**;Aug 12, 1996
  1. ;; ;
  1. Q
  1. ;
  1. NEWHOSL ;Entry point for selecting new hospital location
  1. D FULL^VALM1
  1. Q:'$$NEWLOC($G(PXCEHLOC))
  1. D NEWHOSL1
  1. G MAKELIST
  1. ;
  1. NEWHOSL1 ;Entry point from initial selection of hospital location
  1. I $P(PXCEVIEW,"^",1)'="H" D
  1. . S $P(PXCEVIEW,"^",1)="H"
  1. . D SETDATES^PXCE
  1. S SDAMTYP="C"
  1. D PATKILL^PXCEPAT
  1. Q
  1. ;
  1. NEWHLOC ;
  1. D FULL^VALM1
  1. N X,Y,DONE
  1. S DONE=0
  1. I PXCEVIEW'["H" D
  1. . N DIR,DA
  1. . S DIR(0)="Y"
  1. . S DIR("A")="Include all Clinics: "
  1. . S DIR("B")="Yes"
  1. . D ^DIR
  1. . I Y K PXCEHLOC S DONE=1
  1. I 'DONE Q:'$$NEWLOC($G(PXCEHLOC))
  1. G MAKELIST
  1. ;
  1. NEWLOC(HOSPLOC) ;
  1. N NEWHLOC
  1. S NEWHLOC=$P($$LOCATION($G(HOSPLOC)),"^")
  1. I NEWHLOC'>0,("~H~P~"'[("~"_$P(PXCEVIEW,"^")_"~")) S VALMQUIT=1
  1. I NEWHLOC'>0 Q 0
  1. S PXCEHLOC=NEWHLOC
  1. Q 1
  1. ;
  1. LOCATION(HOSPLOC) ; Select a hospital location
  1. N DIR,DA,X,Y
  1. S DIR(0)="9000010,.22O"
  1. S:$G(HOSPLOC)]"" DIR("B")=$P(^SC(HOSPLOC,0),"^",1)
  1. D ^DIR
  1. Q Y
  1. ;
  1. CLINICST(CLINIC) ; Select a Clinic Stop Code
  1. N DIC,DA,X,Y
  1. S DIC="^DIC(40.7,"
  1. S DIC(0)="AEM"
  1. S DIC("S")="I $P(^(0),U,3)="""""
  1. S:$G(CLINIC)]"" DIC("B")=$P(^DIC(40.7,CLINIC,0),"^",1)
  1. D ^DIC
  1. Q Y
  1. ;
  1. MAKELIST ;
  1. I PXCEVIEW["V" D
  1. . D @$S(PXCEVIEW["H":"MAKELIST^PXCEHLOC",PXCEVIEW["P":"MAKELIST^PXCEPAT",1:"QUIT")
  1. E I PXCEVIEW["A" D @$S(PXCEVIEW["H":"CLNSDAM3^PXCESDA3",PXCEVIEW["P":"PATSDAM1^PXCESDA1",1:"QUIT")
  1. Q
  1. ;
  1. QUIT Q
  1. ;