PSSDSBPC ;BIR/MJE-Determine numeric dose multiplier for dose call, continued ;10/14/10
;;1.0;PHARMACY DATA MANAGEMENT;**117,160**;9/30/97;Build 76
;
NUMC() ;Continuation of Free Text Dosage conversion from routine PSSDSAPL
;
S PSSDBV1=$E(PSSDBV9,1,4) I PSSDBV1="5-6 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,5,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,6) I PSSDBV1="5 - 6 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,7,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="5 TO 6 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="5 OR 6 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="FIVE TO SIX " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="FIVE OR SIX " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,9) I PSSDBV1="FIVE-SIX " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,10,$L(PSSDBV9)) Q $S($$8:6,1:0)
S PSSDBV1=$E(PSSDBV9,1,11) I PSSDBV1="FIVE - SIX " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,12,$L(PSSDBV9)) Q $S($$8:6,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,2) I PSSDBV1="6 ",$$4 S PSSDBV2=$E(PSSDBV9,3,$L(PSSDBV9)) I $$8 Q 6
S PSSDBV1=$E(PSSDBV9,1,4) I PSSDBV1="SIX ",$$4 S PSSDBV2=$E(PSSDBV9,5,$L(PSSDBV9)) I $$8 Q 6
;
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="6 AND 1/4 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:6.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="SIX AND ONE FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:6.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="SIX AND ONE-FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:6.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="6 AND ONE FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:6.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="6 AND ONE-FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:6.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="SIX AND 1/4 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:6.25,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="6 AND 1/3 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:6.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="SIX AND ONE THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:6.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="SIX AND ONE-THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:6.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="6 AND ONE THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:6.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="6 AND ONE-THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:6.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="SIX AND 1/3 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:6.33,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="6 AND 1/2 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:6.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="SIX AND ONE HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:6.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="SIX AND ONE-HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:6.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="6 AND ONE HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:6.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="6 AND ONE-HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:6.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="SIX AND 1/2 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:6.5,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,4) I PSSDBV1="6-7 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,5,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,6) I PSSDBV1="6 - 7 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,7,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="6 TO 7 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="6 OR 7 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,13) I PSSDBV1="SIX TO SEVEN " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,14,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,13) I PSSDBV1="SIX OR SEVEN " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,14,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="SIX-SEVEN " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:7,1:0)
S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="SIX - SEVEN " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:7,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,2) I PSSDBV1="7 ",$$4 S PSSDBV2=$E(PSSDBV9,3,$L(PSSDBV9)) I $$8 Q 7
S PSSDBV1=$E(PSSDBV9,1,6) I PSSDBV1="SEVEN ",$$4 S PSSDBV2=$E(PSSDBV9,7,$L(PSSDBV9)) I $$8 Q 7
;
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="7 AND 1/4 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:7.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,21) I PSSDBV1="SEVEN AND ONE FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,22,$L(PSSDBV9)) Q $S($$8:7.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,21) I PSSDBV1="SEVEN AND ONE-FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,22,$L(PSSDBV9)) Q $S($$8:7.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="7 AND ONE FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:7.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="7 AND ONE-FOURTH " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:7.25,1:0)
S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="SEVEN AND 1/4 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:7.25,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="7 AND 1/3 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:7.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,20) I PSSDBV1="SEVEN AND ONE THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,21,$L(PSSDBV9)) Q $S($$8:7.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,20) I PSSDBV1="SEVEN AND ONE-THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,21,$L(PSSDBV9)) Q $S($$8:7.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="7 AND ONE THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:7.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="7 AND ONE-THIRD " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:7.33,1:0)
S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="SEVEN AND 1/3 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:7.33,1:0)
;
S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="7 AND 1/2 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:7.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="SEVEN AND ONE HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:7.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="SEVEN AND ONE-HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:7.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="7 AND ONE HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:7.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="7 AND ONE-HALF " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:7.5,1:0)
S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="SEVEN AND 1/2 " Q:'$$4 0 S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:7.5,1:0)
;
Q ""
;
8() ;Look for Unit - PSSDBIFL set in PSSSAPD, indicates if Order has a Dispense Drug, or just an Orderable Item
S PSSDBV3="" D
.I PSSDBIFL S PSSDBV3=$$UNITD^PSSDSAPI(PSSDBV2) Q
.S PSSDBV3=$$UNIT^PSSDSAPI(PSSDBV2)
Q $S(PSSDBV3="":0,1:1)
;
4() ;Validate text follow the numeric part of the text
I $L(PSSDBV9)'>$L(PSSDBV1) Q 0
Q 1
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSSDSBPC 7243 printed Nov 22, 2024@17:41:14 Page 2
PSSDSBPC ;BIR/MJE-Determine numeric dose multiplier for dose call, continued ;10/14/10
+1 ;;1.0;PHARMACY DATA MANAGEMENT;**117,160**;9/30/97;Build 76
+2 ;
NUMC() ;Continuation of Free Text Dosage conversion from routine PSSDSAPL
+1 ;
+2 SET PSSDBV1=$EXTRACT(PSSDBV9,1,4)
IF PSSDBV1="5-6 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,5,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+3 SET PSSDBV1=$EXTRACT(PSSDBV9,1,6)
IF PSSDBV1="5 - 6 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,7,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+4 SET PSSDBV1=$EXTRACT(PSSDBV9,1,7)
IF PSSDBV1="5 TO 6 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,8,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+5 SET PSSDBV1=$EXTRACT(PSSDBV9,1,7)
IF PSSDBV1="5 OR 6 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,8,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+6 SET PSSDBV1=$EXTRACT(PSSDBV9,1,12)
IF PSSDBV1="FIVE TO SIX "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,13,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+7 SET PSSDBV1=$EXTRACT(PSSDBV9,1,12)
IF PSSDBV1="FIVE OR SIX "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,13,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+8 SET PSSDBV1=$EXTRACT(PSSDBV9,1,9)
IF PSSDBV1="FIVE-SIX "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,10,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+9 SET PSSDBV1=$EXTRACT(PSSDBV9,1,11)
IF PSSDBV1="FIVE - SIX "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,12,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6,1:0)
+10 ;
+11 SET PSSDBV1=$EXTRACT(PSSDBV9,1,2)
IF PSSDBV1="6 "
IF $$4
SET PSSDBV2=$EXTRACT(PSSDBV9,3,$LENGTH(PSSDBV9))
IF $$8
QUIT 6
+12 SET PSSDBV1=$EXTRACT(PSSDBV9,1,4)
IF PSSDBV1="SIX "
IF $$4
SET PSSDBV2=$EXTRACT(PSSDBV9,5,$LENGTH(PSSDBV9))
IF $$8
QUIT 6
+13 ;
+14 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="6 AND 1/4 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.25,1:0)
+15 SET PSSDBV1=$EXTRACT(PSSDBV9,1,19)
IF PSSDBV1="SIX AND ONE FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,20,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.25,1:0)
+16 SET PSSDBV1=$EXTRACT(PSSDBV9,1,19)
IF PSSDBV1="SIX AND ONE-FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,20,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.25,1:0)
+17 SET PSSDBV1=$EXTRACT(PSSDBV9,1,17)
IF PSSDBV1="6 AND ONE FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,18,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.25,1:0)
+18 SET PSSDBV1=$EXTRACT(PSSDBV9,1,17)
IF PSSDBV1="6 AND ONE-FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,18,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.25,1:0)
+19 SET PSSDBV1=$EXTRACT(PSSDBV9,1,12)
IF PSSDBV1="SIX AND 1/4 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,13,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.25,1:0)
+20 ;
+21 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="6 AND 1/3 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.33,1:0)
+22 SET PSSDBV1=$EXTRACT(PSSDBV9,1,18)
IF PSSDBV1="SIX AND ONE THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,19,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.33,1:0)
+23 SET PSSDBV1=$EXTRACT(PSSDBV9,1,18)
IF PSSDBV1="SIX AND ONE-THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,19,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.33,1:0)
+24 SET PSSDBV1=$EXTRACT(PSSDBV9,1,16)
IF PSSDBV1="6 AND ONE THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,17,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.33,1:0)
+25 SET PSSDBV1=$EXTRACT(PSSDBV9,1,16)
IF PSSDBV1="6 AND ONE-THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,17,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.33,1:0)
+26 SET PSSDBV1=$EXTRACT(PSSDBV9,1,12)
IF PSSDBV1="SIX AND 1/3 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,13,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.33,1:0)
+27 ;
+28 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="6 AND 1/2 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.5,1:0)
+29 SET PSSDBV1=$EXTRACT(PSSDBV9,1,17)
IF PSSDBV1="SIX AND ONE HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,18,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.5,1:0)
+30 SET PSSDBV1=$EXTRACT(PSSDBV9,1,17)
IF PSSDBV1="SIX AND ONE-HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,18,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.5,1:0)
+31 SET PSSDBV1=$EXTRACT(PSSDBV9,1,15)
IF PSSDBV1="6 AND ONE HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,16,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.5,1:0)
+32 SET PSSDBV1=$EXTRACT(PSSDBV9,1,15)
IF PSSDBV1="6 AND ONE-HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,16,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.5,1:0)
+33 SET PSSDBV1=$EXTRACT(PSSDBV9,1,12)
IF PSSDBV1="SIX AND 1/2 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,13,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:6.5,1:0)
+34 ;
+35 SET PSSDBV1=$EXTRACT(PSSDBV9,1,4)
IF PSSDBV1="6-7 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,5,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+36 SET PSSDBV1=$EXTRACT(PSSDBV9,1,6)
IF PSSDBV1="6 - 7 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,7,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+37 SET PSSDBV1=$EXTRACT(PSSDBV9,1,7)
IF PSSDBV1="6 TO 7 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,8,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+38 SET PSSDBV1=$EXTRACT(PSSDBV9,1,7)
IF PSSDBV1="6 OR 7 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,8,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+39 SET PSSDBV1=$EXTRACT(PSSDBV9,1,13)
IF PSSDBV1="SIX TO SEVEN "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,14,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+40 SET PSSDBV1=$EXTRACT(PSSDBV9,1,13)
IF PSSDBV1="SIX OR SEVEN "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,14,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+41 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="SIX-SEVEN "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+42 SET PSSDBV1=$EXTRACT(PSSDBV9,1,12)
IF PSSDBV1="SIX - SEVEN "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,13,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7,1:0)
+43 ;
+44 SET PSSDBV1=$EXTRACT(PSSDBV9,1,2)
IF PSSDBV1="7 "
IF $$4
SET PSSDBV2=$EXTRACT(PSSDBV9,3,$LENGTH(PSSDBV9))
IF $$8
QUIT 7
+45 SET PSSDBV1=$EXTRACT(PSSDBV9,1,6)
IF PSSDBV1="SEVEN "
IF $$4
SET PSSDBV2=$EXTRACT(PSSDBV9,7,$LENGTH(PSSDBV9))
IF $$8
QUIT 7
+46 ;
+47 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="7 AND 1/4 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.25,1:0)
+48 SET PSSDBV1=$EXTRACT(PSSDBV9,1,21)
IF PSSDBV1="SEVEN AND ONE FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,22,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.25,1:0)
+49 SET PSSDBV1=$EXTRACT(PSSDBV9,1,21)
IF PSSDBV1="SEVEN AND ONE-FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,22,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.25,1:0)
+50 SET PSSDBV1=$EXTRACT(PSSDBV9,1,17)
IF PSSDBV1="7 AND ONE FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,18,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.25,1:0)
+51 SET PSSDBV1=$EXTRACT(PSSDBV9,1,17)
IF PSSDBV1="7 AND ONE-FOURTH "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,18,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.25,1:0)
+52 SET PSSDBV1=$EXTRACT(PSSDBV9,1,14)
IF PSSDBV1="SEVEN AND 1/4 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,15,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.25,1:0)
+53 ;
+54 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="7 AND 1/3 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.33,1:0)
+55 SET PSSDBV1=$EXTRACT(PSSDBV9,1,20)
IF PSSDBV1="SEVEN AND ONE THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,21,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.33,1:0)
+56 SET PSSDBV1=$EXTRACT(PSSDBV9,1,20)
IF PSSDBV1="SEVEN AND ONE-THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,21,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.33,1:0)
+57 SET PSSDBV1=$EXTRACT(PSSDBV9,1,16)
IF PSSDBV1="7 AND ONE THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,17,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.33,1:0)
+58 SET PSSDBV1=$EXTRACT(PSSDBV9,1,16)
IF PSSDBV1="7 AND ONE-THIRD "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,17,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.33,1:0)
+59 SET PSSDBV1=$EXTRACT(PSSDBV9,1,14)
IF PSSDBV1="SEVEN AND 1/3 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,15,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.33,1:0)
+60 ;
+61 SET PSSDBV1=$EXTRACT(PSSDBV9,1,10)
IF PSSDBV1="7 AND 1/2 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,11,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.5,1:0)
+62 SET PSSDBV1=$EXTRACT(PSSDBV9,1,19)
IF PSSDBV1="SEVEN AND ONE HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,20,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.5,1:0)
+63 SET PSSDBV1=$EXTRACT(PSSDBV9,1,19)
IF PSSDBV1="SEVEN AND ONE-HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,20,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.5,1:0)
+64 SET PSSDBV1=$EXTRACT(PSSDBV9,1,15)
IF PSSDBV1="7 AND ONE HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,16,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.5,1:0)
+65 SET PSSDBV1=$EXTRACT(PSSDBV9,1,15)
IF PSSDBV1="7 AND ONE-HALF "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,16,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.5,1:0)
+66 SET PSSDBV1=$EXTRACT(PSSDBV9,1,14)
IF PSSDBV1="SEVEN AND 1/2 "
if '$$4
QUIT 0
SET PSSDBV2=$EXTRACT(PSSDBV9,15,$LENGTH(PSSDBV9))
QUIT $SELECT($$8:7.5,1:0)
+67 ;
+68 QUIT ""
+69 ;
8() ;Look for Unit - PSSDBIFL set in PSSSAPD, indicates if Order has a Dispense Drug, or just an Orderable Item
+1 SET PSSDBV3=""
Begin DoDot:1
+2 IF PSSDBIFL
SET PSSDBV3=$$UNITD^PSSDSAPI(PSSDBV2)
QUIT
+3 SET PSSDBV3=$$UNIT^PSSDSAPI(PSSDBV2)
End DoDot:1
+4 QUIT $SELECT(PSSDBV3="":0,1:1)
+5 ;
4() ;Validate text follow the numeric part of the text
+1 IF $LENGTH(PSSDBV9)'>$LENGTH(PSSDBV1)
QUIT 0
+2 QUIT 1