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

PSJ0095.m

Go to the documentation of this file.
  1. PSJ0095 ;BIR/JCH-Populate Pre-Exchange Report Device in Ward Parameteres ;22 JAN 03 / 4:29 PM
  1. ;;5.0; INPATIENT MEDICATIONS ;**95**;16 DEC 97
  1. ;
  1. ENNV ;
  1. I $G(DUZ)="" W !,"Your DUZ is not defined. It must be defined to run this routine." Q
  1. K ZTSAVE,ZTSK S ZTRTN="EN^PSJ0095",ZTDESC="Inpatient Ward Parameter Pre-Exchange Report Device (INPATIENT MEDS)",ZTIO="" D ^%ZTLOAD
  1. W !!,"The population of Inpatient Ward Parameter PRE-EXCHANGE REPORT DEVICE is",$S($D(ZTSK):"",1:" NOT")," queued",!
  1. I $D(ZTSK) D
  1. . W " (to start NOW).",!!,"YOU WILL RECEIVE A MAILMAN MESSAGE WHEN TASK #"_ZTSK_" HAS COMPLETED."
  1. Q
  1. EN ;
  1. N WARD,PXDEV,CC S (WARD,CC)=0
  1. F S WARD=$O(^PS(59.6,WARD)) Q:'WARD S PXDEV=$P($G(^(WARD,0)),"^",29) D
  1. . I PXDEV Q:$D(^%ZIS(1,PXDEV))
  1. . S DA=WARD,DIE="^PS(59.6,",DR="4////HOME" D ^DIE S CC=CC+1
  1. D SENDMSG
  1. Q
  1. ;
  1. DONE ;
  1. K ZTDESC,ZTDTH,ZTIO,ZTREQ,ZTRTN,ZTSAVE,ZTSK S ZTREQ="@"
  1. Q
  1. SENDMSG ;Send mail message when auto-population is complete.
  1. K PSG,XMY S XMDUZ="MEDICATIONS,INPATIENT",XMSUB="PSJ*5*95 POPULATION OF INPATIENT WARD PARAMETER PRE-EXCHANGE REPORT DEVICE "
  1. S XMTEXT="PSG(",XMY(DUZ)="" D NOW^%DTC S Y=% X ^DD("DD")
  1. S PSG(1,0)="The population of the Inpatient Ward parameter 'PRE-EXCHANGE REPORT DEVICE'",PSG(2,0)="completed as of "_Y_"."
  1. S PSG(3,0)="",PSG(4,0)=CC_" Inpatient Wards were updated with this parameter defaulted to 'HOME'."
  1. S PSG(5,0)="This will continue to print the report to the user's screen until it is changed"
  1. S PSG(6,0)="to another device, or deleted to disable the report for that ward."
  1. D ^XMD
  1. Q