source: FOIAVistA/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJLMUT2.m@ 765

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1PSJLMUT2 ;BIR/JLC-DISPLAY UTILITIES ;22 Jun 05
2 ;;5.0; INPATIENT MEDICATIONS ;**146,175,201**;16 DEC 97;Build 2
3 ;
4SHOR(PSJT,PSJI) ;Display outpatient remote order checks.
5 ;; PSJT = Type of order check in ^TMP
6 ;; PSJI = Index to ^TMP to find order check detail
7 ;
8 N PSJD0,PSJD1,PSJRX,PSJRS,FSIG,PSJULN,PSJLF,PSJDN
9 S PSJD0=^TMP($J,PSJT,PSJI,0),PSJD1=^(1)
10 I PSJT="DD" S PSJRX=$P($P(PSJD0,"^",4),";"),PSJRS=$P(PSJD0,"^",5),PSJDN=$P(PSJD0,"^",2)
11 I PSJT="DC" S PSJRX=$P($P(PSJD0,"^",6),";"),PSJRS=$P(PSJD0,"^",7),PSJDN=$P(PSJD0,"^",4)
12 I PSJT="DI" S PSJRX=$P($P(PSJD0,"^",8),";"),PSJRS=$P(PSJD0,"^",9),PSJDN=$P(PSJD0,"^",2)
13 S PSJLF=$P(PSJD1,"^",3),$P(PSJULN,"-",79)=""
14 W !,PSJULN,!
15 W PSJRS I $L(PSJRS)>13 W !
16 W ?14,"Rx #: ",$E(PSJRX,1,$L(PSJRX)-1) I $A($L(PSJRX))<54 W $E(PSJRX,$L(PSJRX))
17 W ?39,PSJDN,! I PSJT="DI" W ?39,$P(PSJD0,"^",4)," INTERACTION",!
18 W $J("Status: ",20),$P(PSJD1,"^",2),?40,$J("Issued: ",20),$P(PSJD1,"^",9)
19 D FSIG(.FSIG)
20 W !,$J("SIG: ",20) F I=1:1 Q:'$D(FSIG(I)) W ?20,FSIG(I),!
21 W $J("QTY: ",20)_$P(PSJD1,"^",5)
22 W !,$J("Provider: ",20),$P(PSJD1,"^",8),?40,$J("Refills remaining: ",20),$P(PSJD1,"^",6)
23 W !?40,$J("Last filled on: ",20),PSJLF
24 W !?40,$J("Days Supply: ",20)_$P(PSJD1,"^",4)
25 W !,PSJULN
26 Q
27FSIG(FSIG) ;Format sig from remote site
28 ;returned in the FSIG array
29 N FFF,NNN,CNT,FVAR,FVAR1,FLIM,HSIG,II,I
30 F I=0:1 Q:'$D(^TMP($J,PSJT,PSJI,1,I)) S HSIG(I+1)=^(I)
31FSTART S (FVAR,FVAR1)="",II=1
32 F FFF=0:0 S FFF=$O(HSIG(FFF)) Q:'FFF S CNT=0 F NNN=1:1:$L(HSIG(FFF)) I $E(HSIG(FFF),NNN)=" "!($L(HSIG(FFF))=NNN) S CNT=CNT+1 D I $L(FVAR)>52 S FSIG(II)=FLIM_" ",II=II+1,FVAR=FVAR1
33 .S FVAR1=$P(HSIG(FFF)," ",(CNT))
34 .S FLIM=FVAR
35 .S FVAR=$S(FVAR="":FVAR1,1:FVAR_" "_FVAR1)
36 I $G(FVAR)'="" S FSIG(II)=FVAR
37 I $G(FSIG(1))=""!($G(FSIG(1))=" ") S FSIG(1)=$G(FSIG(2)) K FSIG(2)
38FQUIT Q
39PAUSE ;
40 K DIR W ! S DIR(0)="EA",DIR("A")="Press Return to continue..." D ^DIR W !
41 Q
Note: See TracBrowser for help on using the repository browser.