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

PSDORNP.m

Go to the documentation of this file.
  1. PSDORNP ;BIR/LTL-Nurse CS Order Entry Print Priority Order (cont'd) ; 17 Feb 95
  1. ;;3.0; CONTROLLED SUBSTANCES ;**20**;13 Feb 97
  1. ;
  1. ; Reference to DD(58.8 supported by DBIA # 10154
  1. ; Reference to $$FMTE^XLFDT( supported by DBIA # 10103
  1. ; Reference to VA(200 supported by DBIA # 10060
  1. ; Reference to PSD(58.8 supported by DBIA # 2711
  1. ;
  1. N Y,ZTRTN,ZTDTH,ZTSK,ZTDESC,ZTIO,ZTSAVE
  1. S ZTRTN="PRINT^PSDORNP",ZTDESC="Print a Controlled Subs order"
  1. S ZTDTH=$H,Y=$P($G(^PSD(58.8,+PSDS,2)),U,11),C=$P(^DD(58.8,29,0),U,2)
  1. D Y^DIQ I Y']"" W !!,"Pharmacy has not set up a priority order printer, you'll need to call." Q
  1. S ZTIO=Y,ZTSAVE("PSD*")="",ZTSAVE("REQD")="",ZTSAVE("NAOU*")=""
  1. W ?40,"Printing on ",Y,"..." D ^%ZTLOAD,HOME^%ZIS Q
  1. PRINT W:$Y&(IOF]"") @IOF W "* PRIORITY CONT. SUBS. ORDER *"
  1. W !!,"Date/Time Needed: ",$$FMTE^XLFDT($G(PSDT(9)),2)
  1. W !,"Location",?14,": ",NAOUN
  1. W !,"Drug",?14,": ",!,PSDRN,!,"Quantity",?14,": ",PSDQTY
  1. W:'$P($G(^PSD(58.8,+PSDS,1,PSDR,0)),U,4) " ZERO IN VAULT"
  1. W !,"Requested by",?14,": ",$P($G(^VA(200,PSDUZ,0)),"^")
  1. W !,"Worksheet #",?14,": ",PSDREC
  1. W !,"Comments:"
  1. I $D(^PSD(58.8,NAOU,1,PSDR,3,PSDA,1,0)) K ^UTILITY($J,"W") F TEXT=0:0 S TEXT=$O(^PSD(58.8,NAOU,1,PSDR,3,PSDA,1,TEXT)) Q:'TEXT D
  1. .S X=$G(^PSD(58.8,NAOU,1,PSDR,3,PSDA,1,TEXT,0)),DIWL=5,DIWR=75,DIWF="W" D ^DIWP
  1. I D ^DIWW
  1. W:$Y&(IOF]"") @IOF
  1. S DIE="^PSD(58.85,",DA=PSDREC,DR="13////"_1 D ^DIE K DIE,DA,DR
  1. S ZTREQ="@" Q