PSOLLU2 ;BIR/JLC - BUILD CONTROL CODES ;20-Jun-2005 23:42;SM
;;7.0;OUTPATIENT PHARMACY;**120,138,141,135,1001,1003**;DEC 1997
;
;Read-only reference to %ZIS(2 supported by DBIA 3435
;Reference to %ZIS(2 supported by DBIA 3884
;
; Modified - IHS/CIA/PLS - 10/27/2004
; IHS/CIA/PLS - 06/20/2005 - Line TYPE+27
N IO,IOST
IO D ^%ZIS
I '$G(IOST(0)) W "No terminal type available." Q
I '$D(DUZ(0)) W "No DUZ defined." Q
I DUZ(0)'="@" W "FileMan access must be @." Q
I $D(^%ZIS(2,IOST(0),55,"B","LL")) W "CONTROL CODES already defined." Q
TYPE W !,"HP or LexMark: " R TYPE:60 W " " I TYPE="" Q
I TYPE'="H",TYPE'="L" W "Enter H for HP or L for LexMark" G TYPE
W !!,"You will be copying the CONTROL CODES to device: ",IO," are you sure? " R ANS:60 W " " I ANS'="Y" G IO
W "Copying..."
S AB="LL",NAME="LASER LABEL",CODE="Q" D FILE
S AB="LLI",NAME="LASER LABEL INIT",CODE="W *27,""&r1F"",*27,""E"",*27,""&l0O"",*27,""&u300D"",*27,""&l3A"",*27,""&l0E"",!" D FILE
S AB="F10",NAME="TEN POINT FONT - NO BOLD",CODE="W *27,""(10U"",*27,""(s1p10v0s0b16602T""" D FILE
S AB="F8",NAME="EIGHT POINT FONT - NO BOLD",CODE="W *27,""(10U"",*27,""(s1p8v0s0b16602T""" D FILE
S AB="F12",NAME="TWELVE POINT FONT - NO BOLD",CODE="W *27,""(10U"",*27,""(s1p12v0s0b16602T""" D FILE
S AB="F9",NAME="NINE POINT FONT - NO BOLD",CODE="W *27,""(10U"",*27,""(s1p9v0s0b16602T""" D FILE
S AB="ST",NAME="START OF TEXT",CODE="S PSOY=PSOY+PSOYI W *27,""*p"",PSOX,""x"",PSOY,""Y""" D FILE
S AB="CDII",NAME="CRITICAL DRUG INTERACTION INITIALIZATION",CODE="S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=""F10""" D FILE
; IHS/CIA/PLS - 10/27/04 - Adjusted section length to allow barcode to print without printer wrap.
;S AB="PMII",NAME="PMI SECTION INITIALIZATION",CODE="S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=""F10"",PSOYM=3899" D FILE
S AB="PMII",NAME="PMI SECTION INITIALIZATION",CODE="S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=""F10"",PSOYM=3819" D FILE
S AB="F6B",NAME="SIX POINT FONT, BOLDED",CODE="W *27,""(10U"",*27,""(s1p6v0s3b16602T""" D FILE
S AB="F8B",NAME="EIGHT POINT FONT, BOLDED",CODE="W *27,""(10U"",*27,""(s1p8v0s3b16602T""" D FILE
S AB="F9B",NAME="NINE POINT FONT, BOLDED",CODE="W *27,""(10U"",*27,""(s1p9v0s3b16602T""" D FILE
S AB="F10B",NAME="TEN POINT FONT, BOLDED",CODE="W *27,""(10U"",*27,""(s1p10v0s3b16602T""" D FILE
S AB="F12B",NAME="12 POINT FONT BOLDED",CODE="W *27,""(10U"",*27,""(s1p12v0s3b16602T""" D FILE
S AB="MLI",NAME="MAILING LABEL INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=1700,PSOY=175,PSOYI=50" D FILE
S AB="ACI",NAME="ADDRESS CHANGE INITIALIZATION",CODE="S PSOHFONT=""F12"",PSOX=1210,PSOY=700,PSOFY=1270" D FILE
S AB="ALI",NAME="ALLERGY SECTION INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=0,PSOY=1350,PSOYI=50,PSOYM=2700" D FILE
S AB="FWU",NAME="FONT WITH UNDERLINE",CODE="W *27,""&d0D""" D FILE
S AB="FDU",NAME="FONT DISABLE UNDERLINE",CODE="W *27,""&d@""" D FILE
S AB="RMI",NAME="RETURN MAIL INITIALIZATION",CODE="S PSOHFONT=""F8"",PSOFONT=""F10"",PSOX=1700,PSOY=35,PSORYI=40,PSOHYI=40,PSOTFONT=""F8"",PSOTY=550" D FILE
S AB="SPI",NAME="SUSPENSE PRINT INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=1210,PSOY=1350,PSOYI=50,PSOCX=1775,PSOYM=2700" D FILE
; IHS/CIA/PLS - 06/20/2005 - Adjust vertical position of the first warning label.
;S AB="WLI",NAME="WARNING LABEL INITIALIZATION",CODE="S PSOX=1050,PSOY=55" D FILE
S AB="WLI",NAME="WARNING LABEL INITIALIZATION",CODE="S PSOX=1050,PSOY=45" D FILE
S AB="RNI",NAME="REFILL NARRATIVE INITIALIZATION",CODE="S PSOY=2860,PSOFONT=""F10"",PSOX=0,PSOYI=50,PSOYM=3950" D FILE
S AB="CNI",NAME="COPAY NARRATIVE INITIALIZATION",CODE="S PSOY=2860,PSOX=1210,PSOYM=3950,PSOFONT=""F10"",PSOYI=50" D FILE
S AB="PII",NAME="PATIENT INSTRUCTION INITIALIZATION",CODE="S PSOX=1210,PSOY=760,PSOFONT=""F12""" D FILE
S AB="RPI",NAME="REFILL PRINT INITIALIZATION",CODE="S PSOFONT=""F10"",PSOBYI=65,PSOTYI=50,PSOLX=0,PSORX=1210,PSOY=1350,PSOYM=3650,PSOXI=90,PSOSYI=135" D FILE
S AB="BLH",NAME="BOTTLE LABEL HEADER INITIALIZATION",CODE="S PSOX=100,PSOY=50,PSOYI=30,PSOFONT=""F9""" D FILE
S AB="BLB",NAME="BOTTLE LABEL BODY INITIALIZATION",CODE="S PSOX=0,PSODX=275,PSOY=140,PSOYI=40,PSOYM=379,PSOFONT=""F10""" D FILE
S AB="BLF",NAME="BOTTLE LABEL FOOTER INITIALIZATION",CODE="S PSODY=460,PSOX=0,PSOCX=280,PSOQY=550,PSOTY=600,PSOFONT=""F10"",PSOQFONT=""F8"",PSODFONT=""F9"",PSOTFONT=""F10""" D FILE
S AB="RT",NAME="ROTATE TEXT",CODE="W *27,""&a90P""" D FILE
S AB="NR",NAME="NORMAL ROTATION",CODE="W *27,""&a0P""" D FILE
S AB="PFDI",NAME="PHARMACY FILL DOCUMENT INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=0,PSOY=690,PSOYI=40,PSOYM=969" D FILE
S AB="PFDQ",NAME="PHARMACY FILL DOCUMENT QUANTITY",CODE="S PSOX=0,PSOCX=200,PSOY=970,PSOYI=50,PSOQFONT=""F8"",PSOFONT=""F10""" D FILE
S AB="PFDW",NAME="PHARMACY FILL DOCUMENT WARNING",CODE="S PSOY=1270,PSOX=600,PSOYI=30,PSOFONT=""F8"",PSOYM=1329" D FILE
S AB="AWI",NAME="ALLERGY WARNING INITIALIZATION",CODE="S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=""F10""" D FILE
S AB="F6",NAME="SIX POINT FONT - NO BOLD",CODE="W *27,""(10U"",*27,""(s1p6v0s0b16602T""" D FILE
S AB="EBT",NAME="END OF BARCODE TEXT",CODE="W *27,""(8U"",*27,""(s1p8v0s0b16602T"",!" D FILE
D @TYPE Q
H S AB="BLBC",NAME="BOTTLE LABEL BARCODE",CODE="W *27,""(9Y"",*27,""(s1p18v0s0b28677T"",*27,""&a90P"",*27,""*p3700x1000Y""" D FILE
S AB="PFDT",NAME="PHARMACY FILL DOCUMENT TRAILER",CODE="S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=""F10"",PSOBYI=50,PSOTFONT=""F9"",PSOBY=1260" D FILE
S AB="EBLBC",NAME="END OF BOTTLE LABEL BARCODE",CODE="W *27,""(10U"",*27,""(s1p10v0s0b16602T"",*27,""&a0P"",!" D FILE
S AB="SBT",NAME="START OF BARCODE TEXT",CODE="S PSOY=PSOY+PSOYI W *27,""*p"",PSOX,""x"",PSOY,""Y"",*27,""(9Y"",*27,""(s1p18v0s0b28683T""" D FILE
S AB="PFI",NAME="PATIENT FILL INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=1230,PSOY=710,PSOYI=50,PSOHFONT=""F12"",PSOBYI=75" D FILE
Q
L S AB="BLBC",NAME="BOTTLE LABEL BARCODE",CODE="W *27,""(s1p10.4v4,12b4,12s24670T"",*27,""&a90P"",*27,""*p3650x1000Y""" D FILE
S AB="PFDT",NAME="PHARMACY FILL DOCUMENT TRAILER",CODE="S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=""F10"",PSOBYI=50,PSOTFONT=""F9"",PSOBY=1280" D FILE
S AB="EBLBC",NAME="END OF BOTTLE LABEL BARCODE",CODE="W *27,""(10U"",*27,""(s1p10v0s0b16602T"",*27,""&a0P"",!" D FILE
S AB="SBT",NAME="START OF BARCODE TEXT",CODE="S PSOY=PSOY+PSOYI W *27,""*p"",PSOX,""x"",PSOY,""Y"",*27,""(s1p14.4v6,18b6,18s24670T""" D FILE
S AB="PFI",NAME="PATIENT FILL INITIALIZATION",CODE="S PSOFONT=""F10"",PSOX=1210,PSOY=710,PSOYI=50,PSOHFONT=""F12"",PSOBYI=100" D FILE
Q
FILE K DIC,DIE S DIC(0)="L",DA(1)=IOST(0),X=AB,DIC="^%ZIS(2,"_DA(1)_",55," D FILE^DICN
K DA,DR,DIE S DIE=DIC,DA=+Y,DA(1)=IOST(0)
S DR=".01////"_AB_";1////"_NAME_";2////"_CODE D ^DIE
Q
PSOLLU2 ;BIR/JLC - BUILD CONTROL CODES ;20-Jun-2005 23:42;SM
+1 ;;7.0;OUTPATIENT PHARMACY;**120,138,141,135,1001,1003**;DEC 1997
+2 ;
+3 ;Read-only reference to %ZIS(2 supported by DBIA 3435
+4 ;Reference to %ZIS(2 supported by DBIA 3884
+5 ;
+6 ; Modified - IHS/CIA/PLS - 10/27/2004
+7 ; IHS/CIA/PLS - 06/20/2005 - Line TYPE+27
+8 NEW IO,IOST
IO DO ^%ZIS
+1 IF '$GET(IOST(0))
WRITE "No terminal type available."
QUIT
+2 IF '$DATA(DUZ(0))
WRITE "No DUZ defined."
QUIT
+3 IF DUZ(0)'="@"
WRITE "FileMan access must be @."
QUIT
+4 IF $DATA(^%ZIS(2,IOST(0),55,"B","LL"))
WRITE "CONTROL CODES already defined."
QUIT
TYPE WRITE !,"HP or LexMark: "
READ TYPE:60
WRITE " "
IF TYPE=""
QUIT
+1 IF TYPE'="H"
IF TYPE'="L"
WRITE "Enter H for HP or L for LexMark"
GOTO TYPE
+2 WRITE !!,"You will be copying the CONTROL CODES to device: ",IO," are you sure? "
READ ANS:60
WRITE " "
IF ANS'="Y"
GOTO IO
+3 WRITE "Copying..."
+4 SET AB="LL"
SET NAME="LASER LABEL"
SET CODE="Q"
DO FILE
+5 SET AB="LLI"
SET NAME="LASER LABEL INIT"
SET CODE="W *27,""&r1F"",*27,""E"",*27,""&l0O"",*27,""&u300D"",*27,""&l3A"",*27,""&l0E"",!"
DO FILE
+6 SET AB="F10"
SET NAME="TEN POINT FONT - NO BOLD"
SET CODE="W *27,""(10U"",*27,""(s1p10v0s0b16602T"""
DO FILE
+7 SET AB="F8"
SET NAME="EIGHT POINT FONT - NO BOLD"
SET CODE="W *27,""(10U"",*27,""(s1p8v0s0b16602T"""
DO FILE
+8 SET AB="F12"
SET NAME="TWELVE POINT FONT - NO BOLD"
SET CODE="W *27,""(10U"",*27,""(s1p12v0s0b16602T"""
DO FILE
+9 SET AB="F9"
SET NAME="NINE POINT FONT - NO BOLD"
SET CODE="W *27,""(10U"",*27,""(s1p9v0s0b16602T"""
DO FILE
+10 SET AB="ST"
SET NAME="START OF TEXT"
SET CODE="S PSOY=PSOY+PSOYI W *27,""*p"",PSOX,""x"",PSOY,""Y"""
DO FILE
+11 SET AB="CDII"
SET NAME="CRITICAL DRUG INTERACTION INITIALIZATION"
SET CODE="S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=""F10"""
DO FILE
+12 ; IHS/CIA/PLS - 10/27/04 - Adjusted section length to allow barcode to print without printer wrap.
+13 ;S AB="PMII",NAME="PMI SECTION INITIALIZATION",CODE="S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=""F10"",PSOYM=3899" D FILE
+14 SET AB="PMII"
SET NAME="PMI SECTION INITIALIZATION"
SET CODE="S PSOX=0,PSOY=1350,PSOYI=50,PSOFONT=""F10"",PSOYM=3819"
DO FILE
+15 SET AB="F6B"
SET NAME="SIX POINT FONT, BOLDED"
SET CODE="W *27,""(10U"",*27,""(s1p6v0s3b16602T"""
DO FILE
+16 SET AB="F8B"
SET NAME="EIGHT POINT FONT, BOLDED"
SET CODE="W *27,""(10U"",*27,""(s1p8v0s3b16602T"""
DO FILE
+17 SET AB="F9B"
SET NAME="NINE POINT FONT, BOLDED"
SET CODE="W *27,""(10U"",*27,""(s1p9v0s3b16602T"""
DO FILE
+18 SET AB="F10B"
SET NAME="TEN POINT FONT, BOLDED"
SET CODE="W *27,""(10U"",*27,""(s1p10v0s3b16602T"""
DO FILE
+19 SET AB="F12B"
SET NAME="12 POINT FONT BOLDED"
SET CODE="W *27,""(10U"",*27,""(s1p12v0s3b16602T"""
DO FILE
+20 SET AB="MLI"
SET NAME="MAILING LABEL INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOX=1700,PSOY=175,PSOYI=50"
DO FILE
+21 SET AB="ACI"
SET NAME="ADDRESS CHANGE INITIALIZATION"
SET CODE="S PSOHFONT=""F12"",PSOX=1210,PSOY=700,PSOFY=1270"
DO FILE
+22 SET AB="ALI"
SET NAME="ALLERGY SECTION INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOX=0,PSOY=1350,PSOYI=50,PSOYM=2700"
DO FILE
+23 SET AB="FWU"
SET NAME="FONT WITH UNDERLINE"
SET CODE="W *27,""&d0D"""
DO FILE
+24 SET AB="FDU"
SET NAME="FONT DISABLE UNDERLINE"
SET CODE="W *27,""&d@"""
DO FILE
+25 SET AB="RMI"
SET NAME="RETURN MAIL INITIALIZATION"
SET CODE="S PSOHFONT=""F8"",PSOFONT=""F10"",PSOX=1700,PSOY=35,PSORYI=40,PSOHYI=40,PSOTFONT=""F8"",PSOTY=550"
DO FILE
+26 SET AB="SPI"
SET NAME="SUSPENSE PRINT INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOX=1210,PSOY=1350,PSOYI=50,PSOCX=1775,PSOYM=2700"
DO FILE
+27 ; IHS/CIA/PLS - 06/20/2005 - Adjust vertical position of the first warning label.
+28 ;S AB="WLI",NAME="WARNING LABEL INITIALIZATION",CODE="S PSOX=1050,PSOY=55" D FILE
+29 SET AB="WLI"
SET NAME="WARNING LABEL INITIALIZATION"
SET CODE="S PSOX=1050,PSOY=45"
DO FILE
+30 SET AB="RNI"
SET NAME="REFILL NARRATIVE INITIALIZATION"
SET CODE="S PSOY=2860,PSOFONT=""F10"",PSOX=0,PSOYI=50,PSOYM=3950"
DO FILE
+31 SET AB="CNI"
SET NAME="COPAY NARRATIVE INITIALIZATION"
SET CODE="S PSOY=2860,PSOX=1210,PSOYM=3950,PSOFONT=""F10"",PSOYI=50"
DO FILE
+32 SET AB="PII"
SET NAME="PATIENT INSTRUCTION INITIALIZATION"
SET CODE="S PSOX=1210,PSOY=760,PSOFONT=""F12"""
DO FILE
+33 SET AB="RPI"
SET NAME="REFILL PRINT INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOBYI=65,PSOTYI=50,PSOLX=0,PSORX=1210,PSOY=1350,PSOYM=3650,PSOXI=90,PSOSYI=135"
DO FILE
+34 SET AB="BLH"
SET NAME="BOTTLE LABEL HEADER INITIALIZATION"
SET CODE="S PSOX=100,PSOY=50,PSOYI=30,PSOFONT=""F9"""
DO FILE
+35 SET AB="BLB"
SET NAME="BOTTLE LABEL BODY INITIALIZATION"
SET CODE="S PSOX=0,PSODX=275,PSOY=140,PSOYI=40,PSOYM=379,PSOFONT=""F10"""
DO FILE
+36 SET AB="BLF"
SET NAME="BOTTLE LABEL FOOTER INITIALIZATION"
SET CODE="S PSODY=460,PSOX=0,PSOCX=280,PSOQY=550,PSOTY=600,PSOFONT=""F10"",PSOQFONT=""F8"",PSODFONT=""F9"",PSOTFONT=""F10"""
DO FILE
+37 SET AB="RT"
SET NAME="ROTATE TEXT"
SET CODE="W *27,""&a90P"""
DO FILE
+38 SET AB="NR"
SET NAME="NORMAL ROTATION"
SET CODE="W *27,""&a0P"""
DO FILE
+39 SET AB="PFDI"
SET NAME="PHARMACY FILL DOCUMENT INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOX=0,PSOY=690,PSOYI=40,PSOYM=969"
DO FILE
+40 SET AB="PFDQ"
SET NAME="PHARMACY FILL DOCUMENT QUANTITY"
SET CODE="S PSOX=0,PSOCX=200,PSOY=970,PSOYI=50,PSOQFONT=""F8"",PSOFONT=""F10"""
DO FILE
+41 SET AB="PFDW"
SET NAME="PHARMACY FILL DOCUMENT WARNING"
SET CODE="S PSOY=1270,PSOX=600,PSOYI=30,PSOFONT=""F8"",PSOYM=1329"
DO FILE
+42 SET AB="AWI"
SET NAME="ALLERGY WARNING INITIALIZATION"
SET CODE="S PSOX=0,PSOY=1400,PSOYI=50,PSOFONT=""F10"""
DO FILE
+43 SET AB="F6"
SET NAME="SIX POINT FONT - NO BOLD"
SET CODE="W *27,""(10U"",*27,""(s1p6v0s0b16602T"""
DO FILE
+44 SET AB="EBT"
SET NAME="END OF BARCODE TEXT"
SET CODE="W *27,""(8U"",*27,""(s1p8v0s0b16602T"",!"
DO FILE
+45 DO @TYPE
QUIT
H SET AB="BLBC"
SET NAME="BOTTLE LABEL BARCODE"
SET CODE="W *27,""(9Y"",*27,""(s1p18v0s0b28677T"",*27,""&a90P"",*27,""*p3700x1000Y"""
DO FILE
+1 SET AB="PFDT"
SET NAME="PHARMACY FILL DOCUMENT TRAILER"
SET CODE="S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=""F10"",PSOBYI=50,PSOTFONT=""F9"",PSOBY=1260"
DO FILE
+2 SET AB="EBLBC"
SET NAME="END OF BOTTLE LABEL BARCODE"
SET CODE="W *27,""(10U"",*27,""(s1p10v0s0b16602T"",*27,""&a0P"",!"
DO FILE
+3 SET AB="SBT"
SET NAME="START OF BARCODE TEXT"
SET CODE="S PSOY=PSOY+PSOYI W *27,""*p"",PSOX,""x"",PSOY,""Y"",*27,""(9Y"",*27,""(s1p18v0s0b28683T"""
DO FILE
+4 SET AB="PFI"
SET NAME="PATIENT FILL INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOX=1230,PSOY=710,PSOYI=50,PSOHFONT=""F12"",PSOBYI=75"
DO FILE
+5 QUIT
L SET AB="BLBC"
SET NAME="BOTTLE LABEL BARCODE"
SET CODE="W *27,""(s1p10.4v4,12b4,12s24670T"",*27,""&a90P"",*27,""*p3650x1000Y"""
DO FILE
+1 SET AB="PFDT"
SET NAME="PHARMACY FILL DOCUMENT TRAILER"
SET CODE="S PSOY=1015,PSOYI=45,PSOX=0,PSOFONT=""F10"",PSOBYI=50,PSOTFONT=""F9"",PSOBY=1280"
DO FILE
+2 SET AB="EBLBC"
SET NAME="END OF BOTTLE LABEL BARCODE"
SET CODE="W *27,""(10U"",*27,""(s1p10v0s0b16602T"",*27,""&a0P"",!"
DO FILE
+3 SET AB="SBT"
SET NAME="START OF BARCODE TEXT"
SET CODE="S PSOY=PSOY+PSOYI W *27,""*p"",PSOX,""x"",PSOY,""Y"",*27,""(s1p14.4v6,18b6,18s24670T"""
DO FILE
+4 SET AB="PFI"
SET NAME="PATIENT FILL INITIALIZATION"
SET CODE="S PSOFONT=""F10"",PSOX=1210,PSOY=710,PSOYI=50,PSOHFONT=""F12"",PSOBYI=100"
DO FILE
+5 QUIT
FILE KILL DIC,DIE
SET DIC(0)="L"
SET DA(1)=IOST(0)
SET X=AB
SET DIC="^%ZIS(2,"_DA(1)_",55,"
DO FILE^DICN
+1 KILL DA,DR,DIE
SET DIE=DIC
SET DA=+Y
SET DA(1)=IOST(0)
+2 SET DR=".01////"_AB_";1////"_NAME_";2////"_CODE
DO ^DIE
+3 QUIT