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

PSSDSBPD.m

Go to the documentation of this file.
PSSDSBPD ;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="7-8 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,5,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,6) I PSSDBV1="7 - 8 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,7,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="7 TO 8 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="7 OR 8 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="SEVEN TO EIGHT " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="SEVEN OR EIGHT " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="SEVEN-EIGHT " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:8,1:0)
 S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="SEVEN - EIGHT " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:8,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,2) I PSSDBV1="8 ",$$4 S PSSDBV2=$E(PSSDBV9,3,$L(PSSDBV9)) I $$8 Q 8
 S PSSDBV1=$E(PSSDBV9,1,6) I PSSDBV1="EIGHT ",$$4 S PSSDBV2=$E(PSSDBV9,7,$L(PSSDBV9)) I $$8 Q 8
 ;
 S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="8 AND 1/4 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:8.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,21) I PSSDBV1="EIGHT AND ONE FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,22,$L(PSSDBV9)) Q $S($$8:8.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,21) I PSSDBV1="EIGHT AND ONE-FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,22,$L(PSSDBV9)) Q $S($$8:8.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="8 AND ONE FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:8.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="8 AND ONE-FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:8.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="EIGHT AND 1/4 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:8.25,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="8 AND 1/3 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:8.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,20) I PSSDBV1="EIGHT AND ONE THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,21,$L(PSSDBV9)) Q $S($$8:8.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,20) I PSSDBV1="EIGHT AND ONE-THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,21,$L(PSSDBV9)) Q $S($$8:8.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="8 AND ONE THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:8.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="8 AND ONE-THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:8.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="EIGHT AND 1/3 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:8.33,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="8 AND 1/2 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:8.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="EIGHT AND ONE HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:8.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="EIGHT AND ONE-HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:8.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="8 AND ONE HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:8.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="8 AND ONE-HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:8.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="EIGHT AND 1/2 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:8.5,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,4) I PSSDBV1="8-9 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,5,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,6) I PSSDBV1="8 - 9 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,7,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="8 TO 9 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="8 OR 9 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="EIGHT TO NINE " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,14) I PSSDBV1="EIGHT OR NINE " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,15,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,11) I PSSDBV1="EIGHT-NINE " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,12,$L(PSSDBV9)) Q $S($$8:9,1:0)
 S PSSDBV1=$E(PSSDBV9,1,13) I PSSDBV1="EIGHT - NINE " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,14,$L(PSSDBV9)) Q $S($$8:9,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,2) I PSSDBV1="9 ",$$4 S PSSDBV2=$E(PSSDBV9,3,$L(PSSDBV9)) I $$8 Q 9
 S PSSDBV1=$E(PSSDBV9,1,5) I PSSDBV1="NINE ",$$4 S PSSDBV2=$E(PSSDBV9,6,$L(PSSDBV9)) I $$8 Q 9
 ;
 S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="9 AND 1/4 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:9.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,20) I PSSDBV1="NINE AND ONE FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,21,$L(PSSDBV9)) Q $S($$8:9.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,20) I PSSDBV1="NINE AND ONE-FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,21,$L(PSSDBV9)) Q $S($$8:9.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="9 AND ONE FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:9.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="9 AND ONE-FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:9.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,13) I PSSDBV1="NINE AND 1/4 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,14,$L(PSSDBV9)) Q $S($$8:9.25,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="9 AND 1/3 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:9.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="NINE AND ONE THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:9.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="NINE AND ONE-THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:9.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="9 AND ONE THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:9.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="9 AND ONE-THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:9.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,13) I PSSDBV1="NINE AND 1/3 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,14,$L(PSSDBV9)) Q $S($$8:9.33,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,10) I PSSDBV1="9 AND 1/2 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,11,$L(PSSDBV9)) Q $S($$8:9.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="NINE AND ONE HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:9.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="NINE AND ONE-HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:9.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="9 AND ONE HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:9.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,15) I PSSDBV1="9 AND ONE-HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,16,$L(PSSDBV9)) Q $S($$8:9.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,13) I PSSDBV1="NINE AND 1/2 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,14,$L(PSSDBV9)) Q $S($$8:9.5,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,5) I PSSDBV1="9-10 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,6,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,7) I PSSDBV1="9 - 10 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,8,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,8) I PSSDBV1="9 TO 10 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,9,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,8) I PSSDBV1="9 OR 10 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,9,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="NINE TO TEN " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="NINE OR TEN " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,9) I PSSDBV1="NINE-TEN " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,10,$L(PSSDBV9)) Q $S($$8:10,1:0)
 S PSSDBV1=$E(PSSDBV9,1,11) I PSSDBV1="NINE - TEN " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,12,$L(PSSDBV9)) Q $S($$8:10,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,3) I PSSDBV1="10 ",$$4 S PSSDBV2=$E(PSSDBV9,4,$L(PSSDBV9)) I $$8 Q 10
 S PSSDBV1=$E(PSSDBV9,1,4) I PSSDBV1="TEN ",$$4 S PSSDBV2=$E(PSSDBV9,5,$L(PSSDBV9)) I $$8 Q 10
 ;
 S PSSDBV1=$E(PSSDBV9,1,11) I PSSDBV1="10 AND 1/4 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,12,$L(PSSDBV9)) Q $S($$8:10.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="TEN AND ONE FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:10.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,19) I PSSDBV1="TEN AND ONE-FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,20,$L(PSSDBV9)) Q $S($$8:10.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="10 AND ONE FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:10.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="10 AND ONE-FOURTH " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:10.25,1:0)
 S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="TEN AND 1/4 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:10.25,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,11) I PSSDBV1="10 AND 1/3 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,12,$L(PSSDBV9)) Q $S($$8:10.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="TEN AND ONE THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:10.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,18) I PSSDBV1="TEN AND ONE-THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,19,$L(PSSDBV9)) Q $S($$8:10.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="10 AND ONE THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:10.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="10 AND ONE-THIRD " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:10.33,1:0)
 S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="TEN AND 1/3 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:10.33,1:0)
 ;
 S PSSDBV1=$E(PSSDBV9,1,11) I PSSDBV1="10 AND 1/2 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,12,$L(PSSDBV9)) Q $S($$8:10.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="TEN AND ONE HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:10.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,17) I PSSDBV1="TEN AND ONE-HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,18,$L(PSSDBV9)) Q $S($$8:10.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="10 AND ONE HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:10.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,16) I PSSDBV1="10 AND ONE-HALF " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,17,$L(PSSDBV9)) Q $S($$8:10.5,1:0)
 S PSSDBV1=$E(PSSDBV9,1,12) I PSSDBV1="TEN AND 1/2 " Q:'$$4 0  S PSSDBV2=$E(PSSDBV9,13,$L(PSSDBV9)) Q $S($$8:10.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