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

PSB3P131.m

Go to the documentation of this file.
  1. PSB3P131 ;BIRMINGHAM/TTH-BUILD,KCF CONTROL CODES ;9/16/21 10:38
  1. ;;3.0;BAR CODE MED ADMIN;**131**;Mar 2004;Build 11
  1. ;;Per VA Directive 2004-038 (or future revisions regarding same), this routine should not be modified.
  1. ;
  1. ; Reference/IA
  1. ; ^%ZIS(2/3435
  1. ; ^%ZIS(2/3884
  1. ;
  1. INIT ; IMPORT BASE TM
  1. N AB,ANS,CODE,NAME,PSBCHO,PSBCODE,PSBTYPE,X,Y,IOST,CODE
  1. S X="P-TCP-ZEB-UD-HAZ 200DPI",DIC=3.2,DIC(0)="L" D ^DIC
  1. Q:'+Y
  1. S IOST(0)=+Y,CODE="W $C(27),""E"" D CLOSE^NVSPRTU"
  1. S DA=IOST(0),DIE=DIC,DR=".02///0;2///#;1////32;3///26;7////^S X=CODE" D ^DIE
  1. ;
  1. ZEBCC ;Zebra Barcode Printer Character Control Code auto install
  1. ; Use $SELECT function to set proper barcode printer control code variable "CODE"
  1. ;
  1. I '$D(^%ZIS(2,IOST(0),55,"B","SL")) S AB="SL",NAME="Start Label",CODE="W !,""^XA"",!,""^LH0,0^FS""" D FILE
  1. I '$D(^%ZIS(2,IOST(0),55,"B","EL")) S AB="EL",NAME="End Label",CODE="W !,""^XZ""" D FILE
  1. I '$D(^%ZIS(2,IOST(0),55,"B","ST")) S AB="ST",NAME="Start Text",CODE="W !,""^FO""_PSBTYPE_""^A0N,30,20^CI13^FR^FD""_TEXT_""^FS""" D FILE
  1. I '$D(^%ZIS(2,IOST(0),55,"B","SB")) S AB="SB",NAME="Start Barcode" D D FILE
  1. .S CODE="S PSBTYPE=$S(PSBSYM=""I25"":""B2N"",PSBSYM=""128"":""BCN"",1:""B3N,N"")"
  1. .S CODE=CODE_" S:PSBSYM="""" PSBBAR=""NO-CODE"" W !,""^BY2,3.0,80^FO20,115^""_PSBTYPE_"",60,Y,N^FR^FD""_PSBBAR_""^FS"""
  1. I '$D(^%ZIS(2,IOST(0),55,"B","STF")) S AB="STF",NAME="Start Text Field" D D FILE
  1. .S CODE="S PSBTYPE=$S(PSBTLE=""PSBDRUG"":""20,25"",PSBTLE=""PSBDOSE"":""20,85"",PSBTLE=""PSBNAME"":""350,60"",PSBTLE=""PSBWARD"":""350,90"",PSBTLE=""PSBLOT"":""350,120"","
  1. .S CODE=CODE_"PSBTLE=""PSBEXP"":""350,150"",PSBTLE=""PSBMFG"":""500,150"",PSBTLE=""PSBFCB"":""350,180"",1:""0,0"")"
  1. I '$D(^%ZIS(2,IOST(0),55,"B","HAZ")) S AB="HAZ",NAME="Hazardous Text Field",CODE="S PSBTYPE=$S(PSBTLE=""HAZTEXT"":""20,60"",1:""0,0"")" D FILE
  1. D END
  1. Q
  1. ;
  1. FILE ;Set local array for Zebra Barcode Printer Default Settings
  1. ;
  1. K DD,DIC,DIE,DO
  1. S DIC(0)="L",DA(1)=IOST(0),X=AB,DIC="^%ZIS(2,"_DA(1)_",55," D FILE^DICN K DD,DO
  1. S DIE=DIC,DA=+Y,DA(1)=IOST(0)
  1. S DR=".01////"_AB_";1////"_NAME_";2////^S X=CODE" D ^DIE
  1. Q
  1. END ;Clean Up Routine Variables
  1. K %ZIS,DA,DIC,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,POP,X,Y
  1. Q