source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGOE31.m@ 1133

Last change on this file since 1133 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.8 KB
RevLine 
[613]1PSGOE31 ;BIR/CML3-ORDER ENTRY THROUGH OE/RR (CONT.) ;09 JAN 97 / 2:28 PM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3 ;
4 ;**************************************************
5 ;*** As of 1/9/97 This routine is no longer use ***.
6 ;**************************************************
71 ; provider
8 G:$S($D(PSJOERR):1,+PSJSYSU=3:0,1:$P(PSJSYSU,";",2)) 5
9A1 W !,"PROVIDER: ",$S(PSGPR:PSGPRN_"// ",1:"") R X:DTIME I X="^"!'$T W:'$T $C(7) S PSGOROE1=1 G DONE
10 S PSGF2=1 I $S(X="@":1,X="":'PSGPR,1:0) W $C(7)," (Required)" S X="?" D ENHLP^PSGOEM(53.1,1) G A1
11 I X="",PSGPR S X=PSGPRN I PSGPR'=PSGPRN,$D(^VA(200,PSGPR,"PS")) W " "_$P(^("PS"),"^",2)_" "_$P(^("PS"),"^",3) S PSGFOK(1)="" G:$P(PSJSYSW0,"^",24) 5 G DONE
12 I X?1."?" D ENHLP^PSGOEM(53.1,1)
13 I $E(X)="^" D FF G:Y>0 @Y G A1
14 K DIC S DIC="^VA(200,",DIC(0)="EMQZ",DIC("S")="I $D(^(""PS"")),^(""PS""),$S('$P(^(""PS""),""^"",4):1,1:$P(^(""PS""),""^"",4)>DT)" D ^DIC K DIC I Y'>0 G A1
15 S PSGPR=+Y,PSGPRN=$P(Y(0,0),"^"),PSGFOK(1)=""
16 ;
175 ; self med
18 I '$P(PSJSYSW0,"^",24) G 106:PSGOEORF,DONE
19A5 W !,"SELF MED: " W:PSGSM]"" $P("NO^YES","^",PSGSM+1),"// " R X:DTIME I X="^"!'$T W:'$T $C(7) S PSGOROE1=1 G DONE
20 I "01"[X,$L(X)<2 S:PSGSM=""&(X]"") PSGSM=X W:PSGSM]"" " (",$P("NO^YES","^",PSGSM+1),")" G:'PSGSM 106:PSGOEORF,DONE S PSGFOK(5)="" G 6
21 S PSGF2=5 I X="@" W:PSGSM="" $C(7)," ??" G:PSGSM="" A5 D DEL G:%'=1 A5 S (PSGSM,PSGHSM)="" G 106:PSGOEORF,DONE
22 I X?1"^".E D FF G:Y>0 @Y G A5
23 I X?1."?" D ENHLP^PSGOEM(53.1,5) G A5
24 D YN I S PSGSM=$E(X)="Y",PSGFOK(5)="" G 6:PSGSM,106:PSGOEORF,DONE
25 W $C(7) D ENHLP^PSGOEM(53.1,5) G A5
26 ;
276 ; hospital supplied self med
28 W !,"HOSPITAL SUPPLIED SELF MED: " W:PSGHSM]"" $P("NO^YES","^",PSGHSM+1),"// " R X:DTIME I X="^"!'$T W:'$T $C(7) S PSGOROE1=1 G DONE
29 I "01"[X,$L(X)<2 S:PSGHSM=""&(X]"") PSGHSM=X W:PSGHSM]"" " (",$P("NO^YES","^",PSGHSM+1),")" G 106:PSGOEORF,DONE
30 I X="@" W:PSGHSM="" $C(7)," ??" G:PSGHSM="" 6 D DEL G:%'=1 6 S PSGHSM="" G 106:PSGOEORF,DONE
31 S PSGF2=6 I X?1"^".E D FF G:Y>0 @Y G 6
32 I X?1."?" D ENHLP^PSGOEM(53.1,6) G 6
33 D YN I S PSGHSM=$E(X)="Y" G 106:PSGOEORF,DONE
34 W $C(7) D ENHLP^PSGOEM(53.1,6) G 6
35 ;
36106 ; nature of order
37 W !,"This is an old nature of order call from ^PSGOE31.",!
38 Q
39 G:'PSGOEORF DONE I $S($D(PSJOERR):1,$P(PSJSYSU,";",2):1,1:'PSJSYSU) S PSGFOK(106)="" G DONE
40A106 W !!,"NATURE OF ORDER: ",PSJNOON,"// " R X:DTIME I X="^"!'$T W:'$T $C(7) S:'$T X="^" S PSGOROE1=1 G DONE
41 I X="" W:PSJNOON]"" " ",PSJNOON S PSGFOK(106)="" G DONE
42 S PSGF2=106 I X="@"!(X?1."?") W:X="@" $C(7)," (Required)" S:X="@" X="?" D ENHLP^PSGOEM(53.1,106) G A106
43 I $E(X)="^" D FF G:Y>0 @Y G A106
44 F Y="W^WRITTEN","P^TELEPHONED","V^VERBAL" I $S(X=$P(Y,"^"):1,1:$P($P(Y,"^",2),X)="") W $S(X=$P(Y,"^"):" "_$P(Y,"^",2),1:$P($P(Y,"^",2),X,2)) S PSJNOO=$P(Y,"^"),PSJNOON=$P(Y,"^",2) Q
45 E W $C(7)," ??" S X="?" D ENHLP^PSGOEM(53.1,106) G A106
46 S PSGFOK(106)=""
47 ;
48DONE ;
49 I PSGOROE1 K Y W $C(7)," ...order not entered..."
50 K F,F0,F1,PSGF2,F3,PSGFOK,PSGOROE1,PSGSD,SDT Q
51 ;
52FF ; up-arrow to another field
53 S Y=-1 I '$D(PSGFOK) W $C(7)," ??" Q
54 S X=$E(X,2,99) I X=+X S Y=$S($D(PSGFOK(X)):X,1:-1) W " " W:Y>0 $P(^DD(53.1,X,0),"^") W:Y'>0 $C(7),"??" Q
55 K DIC S DIC="^DD(53.1,",DIC(0)="QEM",DIC("S")="I $D(PSGFOK(+Y))" D ^DIC K DIC S Y=+Y I Y>0 S:Y=2 FB=PSGF2 I Y'=1,Y'=2,Y'=5,Y'=6 S Y=Y_"^PSGOE3"
56 Q
57 ;
58DEL ;
59 W !?3,"SURE YOU WANT TO DELETE" S %=0 D YN^DICN I %'=1 W " <NOTHING DELETED>"
60 Q
61 ;
62YN ; yes/no as a set of codes
63 I X'?.U F Y=1:1:$L(X) I $E(X,Y)?1L S X=$E(X,1,Y-1)_$C($A(X,Y)-32)_$E(X,Y+1,$L(X))
64 F Y="NO","YES" I $P(Y,X)="" W $P(Y,X,2) Q
65 Q
66 ;
672 ; dispense drug multiple
68 I PSGDRG,'$D(^PS(53.45,PSJSYSP,2)) S ^(2,0)="^53.4502P^1^1",^(1,0)=PSGDRG_"^"_PSGUD
69 K DA,DR S DIE="^PS(53.45,",DA=PSJSYSP,DR=2,DR(53.4502,1)=".01;.02" D ^DIE
70 I '$O(^PS(53.45,PSJSYSP,2,0)) W $C(7),!!,"WARNING: This order must have at least one dispense drug before pharmacy can",!?9,"verify it!"
71 G @FB
Note: See TracBrowser for help on using the repository browser.