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

PXPT.m

Go to the documentation of this file.
  1. PXPT ;ISL/MKB,DLT,dee - Patient/IHS maintenance routine ;8/10/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
  1. EN ; entry point
  1. D LOC,MASTER,QUE
  1. Q
  1. ;
  1. LOC ;POPULATE LOCATION FILE
  1. D BMES^XPDUTL("Populating the LOCATION File #9999999.06 from the Institution File")
  1. K DD,DO
  1. S DIC="^AUTTLOC(",DIC(0)=""
  1. S PXPTINST=0 F S PXPTINST=$O(^DIC(4,PXPTINST)) Q:'PXPTINST S (X,DINUM)=PXPTINST D FILE^DICN
  1. K PXPTINST
  1. Q
  1. ;
  1. MASTER ;Populate the PXPT fields $501 & #502 in PCE PARAMETERS file (#815)
  1. ;
  1. N PXPTLOC
  1. D BMES^XPDUTL("Populating the PXPT fields of the PCE PARAMETERS file (#815)")
  1. S PXPTLOC=+$G(XPDQUES("POS PXPT LOCATION"))
  1. D:PXPTLOC'>0 GETLOC
  1. S:PXPTLOC'>0 PXPTLOC=+$$SITE^VASITE
  1. I '(+$G(^PX(815,1,"PXPT"))) S $P(^PX(815,1,"PXPT"),"^",1)=PXPTLOC
  1. I $P($G(^PX(815,1,"PXPT")),"^",2)="" S $P(^PX(815,1,"PXPT"),"^",2)="READY TO POPULATE"
  1. Q
  1. ;
  1. QUE ; Queue job to populate IHS Patient File #9000001
  1. N ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK
  1. N PXPTLOC,DINUM
  1. D GETLOC I 'PXPTLOC W $C(7),!!,"Error in setup, run D MASTER^PXPTPOST" Q
  1. S PXPTLAST=$P($G(^PX(815,1,"PXPT")),"^",2)
  1. I PXPTLAST=0 D Q:'Y Q:Y["^"
  1. .W !!,"The population of the Patient/IHS file has previously completed.",!
  1. .S DIR(0)="Y",DIR("B")="NO",DIR("A")="Do you want to retask the job to populate the Patient/IHS file"
  1. .D ^DIR
  1. I PXPTLAST>0 D
  1. .W !!,"The population of the Patient/IHS file is partially completed."
  1. .W !,"Populating will start from the patient last populated from the previous"
  1. .W !,"tasked job."
  1. Q1 W !!,"Populating the Patient/IHS File #9000001 via the following queued job ... "
  1. W !!,">> I will queue this job; please specify a start time for it."
  1. S ZTRTN="LOAD^PXXDPT",ZTDESC="Patient File (#9000001) Population",ZTIO=""
  1. S ZTSAVE("PXPTLOC")=PXPTLOC
  1. D ^%ZTLOAD
  1. I '$D(ZTSK) W $C(7),!!,"You MUST schedule this job at this time!",!,"This is a required task.",! G QUE
  1. W !,"Task #"_ZTSK
  1. Q
  1. ;
  1. ;
  1. GETLOC S PXPTLOC=$P($G(^PX(815,1,"PXPT")),"^",1)
  1. Q
  1. ;