Difference between revisions of "ROUTINE PSJLMUTL*7,67,58,85,111,160,198*"
From VistApedia
DavidWhitten (talk | contribs) (Created page with " __TOC__ == ROUTINE PSJLMUTL == <pre>PSJLMUTL * * 182 LINES, 8955 BYTES, RSUM: 18527876/56399275 Page 1 UCI: EHR,EHR Site: Central Regional Hospital MAY 18,2...") |
(No difference)
|
Latest revision as of 19:11, 18 May 2015
Contents
- 1 ROUTINE PSJLMUTL
- 2 PSJLMUTL^PSJLMUTL
- 3 NEWALL(DFN)^PSJLMUTL
- 3.1 NEWALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
- 3.2 NEWALL(DFN)^PSJLMUTL REFERENCED BY
- 3.3 NEWALL(DFN)^PSJLMUTL REFERS TO
- 3.4 NEWALL(DFN)^PSJLMUTL CALLED BY
- 3.5 NEWALL(DFN)^PSJLMUTL CALLS
- 3.6 NEWALL(DFN)^PSJLMUTL LOCKS
- 3.7 NEWALL(DFN)^PSJLMUTL LOCALS
- 3.8 NEWALL(DFN)^PSJLMUTL GLOBALS
- 3.9 NEWALL(DFN)^PSJLMUTL CODE
- 4 DISALL(DFN)^PSJLMUTL
- 4.1 DISALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
- 4.2 DISALL(DFN)^PSJLMUTL REFERENCED BY
- 4.3 DISALL(DFN)^PSJLMUTL REFERS TO
- 4.4 DISALL(DFN)^PSJLMUTL CALLED BY
- 4.5 DISALL(DFN)^PSJLMUTL CALLS
- 4.6 DISALL(DFN)^PSJLMUTL LOCKS
- 4.7 DISALL(DFN)^PSJLMUTL LOCALS
- 4.8 DISALL(DFN)^PSJLMUTL GLOBALS
- 4.9 DISALL(DFN)^PSJLMUTL CODE
- 5 NARRATIV^PSJLMUTL
- 6 SDA^PSJLMUTL
- 7 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL
- 7.1 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL INTEGRATION AGREEMENTS
- 7.2 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL REFERENCED BY
- 7.3 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL REFERS TO
- 7.4 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL CALLED BY
- 7.5 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL CALLS
- 7.6 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL LOCKS
- 7.7 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL LOCALS
- 7.8 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL GLOBALS
- 7.9 ENC(SDPATDFN,SDCLIEN)^PSJLMUTL CODE
- 8 SETNAR(SUB,NARR,TYPE)^PSJLMUTL
- 8.1 SETNAR(SUB,NARR,TYPE)^PSJLMUTL INTEGRATION AGREEMENTS
- 8.2 SETNAR(SUB,NARR,TYPE)^PSJLMUTL REFERENCED BY
- 8.3 SETNAR(SUB,NARR,TYPE)^PSJLMUTL REFERS TO
- 8.4 SETNAR(SUB,NARR,TYPE)^PSJLMUTL CALLED BY
- 8.5 SETNAR(SUB,NARR,TYPE)^PSJLMUTL CALLS
- 8.6 SETNAR(SUB,NARR,TYPE)^PSJLMUTL LOCKS
- 8.7 SETNAR(SUB,NARR,TYPE)^PSJLMUTL LOCALS
- 8.8 SETNAR(SUB,NARR,TYPE)^PSJLMUTL GLOBALS
- 8.9 SETNAR(SUB,NARR,TYPE)^PSJLMUTL CODE
- 9 SET^PSJLMUTL
- 10 ACTIONS()^PSJLMUTL
- 10.1 ACTIONS()^PSJLMUTL INTEGRATION AGREEMENTS
- 10.2 ACTIONS()^PSJLMUTL REFERENCED BY
- 10.3 ACTIONS()^PSJLMUTL REFERS TO
- 10.4 ACTIONS()^PSJLMUTL CALLED BY
- 10.5 ACTIONS()^PSJLMUTL CALLS
- 10.6 ACTIONS()^PSJLMUTL LOCKS
- 10.7 ACTIONS()^PSJLMUTL LOCALS
- 10.8 ACTIONS()^PSJLMUTL GLOBALS
- 10.9 ACTIONS()^PSJLMUTL CODE
- 11 RNACT()^PSJLMUTL
- 12 TECHACT()^PSJLMUTL
- 12.1 TECHACT()^PSJLMUTL INTEGRATION AGREEMENTS
- 12.2 TECHACT()^PSJLMUTL REFERENCED BY
- 12.3 TECHACT()^PSJLMUTL REFERS TO
- 12.4 TECHACT()^PSJLMUTL CALLED BY
- 12.5 TECHACT()^PSJLMUTL CALLS
- 12.6 TECHACT()^PSJLMUTL LOCKS
- 12.7 TECHACT()^PSJLMUTL LOCALS
- 12.8 TECHACT()^PSJLMUTL GLOBALS
- 12.9 TECHACT()^PSJLMUTL CODE
- 13 PATINFO()^PSJLMUTL
- 13.1 PATINFO()^PSJLMUTL INTEGRATION AGREEMENTS
- 13.2 PATINFO()^PSJLMUTL REFERENCED BY
- 13.3 PATINFO()^PSJLMUTL REFERS TO
- 13.4 PATINFO()^PSJLMUTL CALLED BY
- 13.5 PATINFO()^PSJLMUTL CALLS
- 13.6 PATINFO()^PSJLMUTL LOCKS
- 13.7 PATINFO()^PSJLMUTL LOCALS
- 13.8 PATINFO()^PSJLMUTL GLOBALS
- 13.9 PATINFO()^PSJLMUTL CODE
- 14 HIDDEN(CHK)^PSJLMUTL
- 14.1 HIDDEN(CHK)^PSJLMUTL INTEGRATION AGREEMENTS
- 14.2 HIDDEN(CHK)^PSJLMUTL REFERENCED BY
- 14.3 HIDDEN(CHK)^PSJLMUTL REFERS TO
- 14.4 HIDDEN(CHK)^PSJLMUTL CALLED BY
- 14.5 HIDDEN(CHK)^PSJLMUTL CALLS
- 14.6 HIDDEN(CHK)^PSJLMUTL LOCKS
- 14.7 HIDDEN(CHK)^PSJLMUTL LOCALS
- 14.8 HIDDEN(CHK)^PSJLMUTL GLOBALS
- 14.9 HIDDEN(CHK)^PSJLMUTL CODE
- 15 NA(TXT)^PSJLMUTL
- 16 UPR(DFN)^PSJLMUTL
- 17 DETALL(DFN)^PSJLMUTL
- 17.1 DETALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
- 17.2 DETALL(DFN)^PSJLMUTL REFERENCED BY
- 17.3 DETALL(DFN)^PSJLMUTL REFERS TO
- 17.4 DETALL(DFN)^PSJLMUTL CALLED BY
- 17.5 DETALL(DFN)^PSJLMUTL CALLS
- 17.6 DETALL(DFN)^PSJLMUTL LOCKS
- 17.7 DETALL(DFN)^PSJLMUTL LOCALS
- 17.8 DETALL(DFN)^PSJLMUTL GLOBALS
- 17.9 DETALL(DFN)^PSJLMUTL CODE
- 18 BRFALL(DFN)^PSJLMUTL
- 18.1 BRFALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
- 18.2 BRFALL(DFN)^PSJLMUTL REFERENCED BY
- 18.3 BRFALL(DFN)^PSJLMUTL REFERS TO
- 18.4 BRFALL(DFN)^PSJLMUTL CALLED BY
- 18.5 BRFALL(DFN)^PSJLMUTL CALLS
- 18.6 BRFALL(DFN)^PSJLMUTL LOCKS
- 18.7 BRFALL(DFN)^PSJLMUTL LOCALS
- 18.8 BRFALL(DFN)^PSJLMUTL GLOBALS
- 18.9 BRFALL(DFN)^PSJLMUTL CODE
- 19 PAUSE^PSJLMUTL
- 20 DRUGNAME(DFN,ON)^PSJLMUTL
- 20.1 DRUGNAME(DFN,ON)^PSJLMUTL INTEGRATION AGREEMENTS
- 20.2 DRUGNAME(DFN,ON)^PSJLMUTL REFERENCED BY
- 20.3 DRUGNAME(DFN,ON)^PSJLMUTL REFERS TO
- 20.4 DRUGNAME(DFN,ON)^PSJLMUTL CALLED BY
- 20.5 DRUGNAME(DFN,ON)^PSJLMUTL CALLS
- 20.6 DRUGNAME(DFN,ON)^PSJLMUTL LOCKS
- 20.7 DRUGNAME(DFN,ON)^PSJLMUTL LOCALS
- 20.8 DRUGNAME(DFN,ON)^PSJLMUTL GLOBALS
- 20.9 DRUGNAME(DFN,ON)^PSJLMUTL CODE
- 21 DDNAME(X)^PSJLMUTL
- 21.1 DDNAME(X)^PSJLMUTL INTEGRATION AGREEMENTS
- 21.2 DDNAME(X)^PSJLMUTL REFERENCED BY
- 21.3 DDNAME(X)^PSJLMUTL REFERS TO
- 21.4 DDNAME(X)^PSJLMUTL CALLED BY
- 21.5 DDNAME(X)^PSJLMUTL CALLS
- 21.6 DDNAME(X)^PSJLMUTL LOCKS
- 21.7 DDNAME(X)^PSJLMUTL LOCALS
- 21.8 DDNAME(X)^PSJLMUTL GLOBALS
- 21.9 DDNAME(X)^PSJLMUTL CODE
- 22 OINAME(ND)^PSJLMUTL
- 22.1 OINAME(ND)^PSJLMUTL INTEGRATION AGREEMENTS
- 22.2 OINAME(ND)^PSJLMUTL REFERENCED BY
- 22.3 OINAME(ND)^PSJLMUTL REFERS TO
- 22.4 OINAME(ND)^PSJLMUTL CALLED BY
- 22.5 OINAME(ND)^PSJLMUTL CALLS
- 22.6 OINAME(ND)^PSJLMUTL LOCKS
- 22.7 OINAME(ND)^PSJLMUTL LOCALS
- 22.8 OINAME(ND)^PSJLMUTL GLOBALS
- 22.9 OINAME(ND)^PSJLMUTL CODE
- 23 FOUND(DNME,DN,FN)^PSJLMUTL
- 23.1 FOUND(DNME,DN,FN)^PSJLMUTL INTEGRATION AGREEMENTS
- 23.2 FOUND(DNME,DN,FN)^PSJLMUTL REFERENCED BY
- 23.3 FOUND(DNME,DN,FN)^PSJLMUTL REFERS TO
- 23.4 FOUND(DNME,DN,FN)^PSJLMUTL CALLED BY
- 23.5 FOUND(DNME,DN,FN)^PSJLMUTL CALLS
- 23.6 FOUND(DNME,DN,FN)^PSJLMUTL LOCKS
- 23.7 FOUND(DNME,DN,FN)^PSJLMUTL LOCALS
- 23.8 FOUND(DNME,DN,FN)^PSJLMUTL GLOBALS
- 23.9 FOUND(DNME,DN,FN)^PSJLMUTL CODE
ROUTINE PSJLMUTL
PSJLMUTL * * 182 LINES, 8955 BYTES, RSUM: 18527876/56399275 Page 1 UCI: EHR,EHR Site: Central Regional Hospital MAY 18,2015@15:09
PSJLMUTL^PSJLMUTL
PSJLMUTL^PSJLMUTL INTEGRATION AGREEMENTS
PSJLMUTL^PSJLMUTL REFERENCED BY
PSJLMUTL^PSJLMUTL REFERS TO
PSJLMUTL^PSJLMUTL CALLED BY
PSJLMUTL^PSJLMUTL CALLS
PSJLMUTL^PSJLMUTL LOCKS
PSJLMUTL^PSJLMUTL LOCALS
PSJLMUTL^PSJLMUTL GLOBALS
PSJLMUTL^PSJLMUTL CODE
1 PSJLMUTL -- ;BIR/MLM-INPATIENT LISTMAN UTILITIES ; 9/12/07 10:28am 2 +1 ;;5.0; INPATIENT MEDICATIONS ;**7,67,58,85,111,160,198**;16 DEC 97; Build 7 3 +2 ; 4 +3 ; Reference to ^ORD(101 is supported by DBIA #872. 5 +4 ; Reference to ^PS(50.606 is supported by DBIA #2174. 6 +5 ; Reference to ^PS(50.7 is supported by DBIA #2180. 7 +6 ; Reference to ^PS(55 is supported by DBIA #2191. 8 +7 ; Reference to ^PSDRUG is supported by DBIA #2192. 9 +8 ; Reference to ^GMRAPEM0 is supported by DBIA #190. 10 +9 ; Reference to ^SDAMA203 is supported by DBIA #4133. 11 +10 ; Reference to ^VSIT is supported by DBIA #1905. 12 +11 ;
NEWALL(DFN)^PSJLMUTL
NEWALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
NEWALL(DFN)^PSJLMUTL REFERENCED BY
NEWALL(DFN)^PSJLMUTL REFERS TO
NEWALL(DFN)^PSJLMUTL CALLED BY
NEWALL(DFN)^PSJLMUTL CALLS
NEWALL(DFN)^PSJLMUTL LOCKS
NEWALL(DFN)^PSJLMUTL LOCALS
NEWALL(DFN)^PSJLMUTL GLOBALS
NEWALL(DFN)^PSJLMUTL CODE
13 NEWALL(DFN) -- ; Enter Allergy info. 14 +1 ; 15 +2 D FULL^VALM1,EN2^GMRAPEM0 16 +3 Q
DISALL(DFN)^PSJLMUTL
DISALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
DISALL(DFN)^PSJLMUTL REFERENCED BY
DISALL(DFN)^PSJLMUTL REFERS TO
DISALL(DFN)^PSJLMUTL CALLED BY
DISALL(DFN)^PSJLMUTL CALLS
DISALL(DFN)^PSJLMUTL LOCKS
DISALL(DFN)^PSJLMUTL LOCALS
DISALL(DFN)^PSJLMUTL GLOBALS
DISALL(DFN)^PSJLMUTL CODE
17 DISALL(DFN) -- ; Display brief patient info list. 18 +1 K ^TMP("PSJALL",$J) N PSJLN,X,Y,PSGALG,PSGRALG,PSGLDR,PSJGMRAL,PSJW HERE S PSJWHERE="PSJLMUTL" 19 +2 D ATS^PSJMUTL(57,57,2) 20 +3 I (PSJGMRAL=0) S ^TMP("PSJALL",$J,1,0)=" Allergies/Reactions: "_"NK A",PSJLN=2 G NARRATIV 21 +4 I (PSJGMRAL="") S ^TMP("PSJALL",$J,1,0)=" Allergies/Reactions: No A llergy Assessment",PSJLN=2 G NARRATIV 22 +5 I ($G(PSGVALG(1))="NKA")!((PSGVALG=0)&(PSGALG=0)) D 23 +6 .S ^TMP("PSJALL",$J,1,0)=" Allergies: "_$G(PSGVALG(1)),PS JLN=2,X=1 24 +7 I ($G(PSGVALG(1))'="NKA")&((PSGVALG>0)!(PSGALG>0)) D 25 +8 .S ^TMP("PSJALL",$J,1,0)="Allergies - Verified: "_$G(PSGVALG(1)),PS JLN=2,X=1 26 +9 .F S X=$O(PSGVALG(X)) Q:'X S ^TMP("PSJALL",$J,PSJLN,0)=" "_PSGVALG(X),PSJLN=PSJLN+1 27 +10 .S ^TMP("PSJALL",$J,PSJLN,0)=" Non-Verified: "_$S($G(PSGALG( 1))=0:"",1:$G(PSGALG(1))),PSJLN=PSJLN+1,X=1 28 +11 .F S X=$O(PSGALG(X)) Q:'X S ^TMP("PSJALL",$J,PSJLN,0)=" "_PSGALG(X),PSJLN=PSJLN+1 29 +12 D RAD^PSJMUTL 30 +13 I ($G(PSGVADR(1))="NKA")!((PSGVADR=0)&(PSGADR=0)) D 31 +14 .S ^TMP("PSJALL",$J,PSJLN,0)="",^TMP("PSJALL",$J,PSJLN+1,0)=" Adv erse Reactions: "_$G(PSGADR(1)),PSJLN=PSJLN+2,X=1 32 +15 I ($G(PSGVADR(1))'="NKA")&((PSGVADR>0)!(PSGADR>0)) D 33 +16 .S ^TMP("PSJALL",$J,PSJLN,0)="",^TMP("PSJALL",$J,PSJLN+1,0)="Reacti ons - Verified: "_$G(PSGVADR(1)),PSJLN=PSJLN+2,X=1 34 +17 .F S X=$O(PSGVADR(X)) Q:'X S ^TMP("PSJALL",$J,PSJLN,0)=" "_PSGVADR(X),PSJLN=PSJLN+1 35 +18 .S ^TMP("PSJALL",$J,PSJLN,0)=" Non-Verified: "_$G(PSGADR(1)) ,PSJLN=PSJLN+2,X=1 36 +19 .F S X=$O(PSGADR(X)) Q:'X S ^TMP("PSJALL",$J,PSJLN,0)=" "_PSGADR(X),PSJLN=PSJLN+1 37 +20 ;
NARRATIV^PSJLMUTL
NARRATIV^PSJLMUTL INTEGRATION AGREEMENTS
NARRATIV^PSJLMUTL REFERENCED BY
NARRATIV^PSJLMUTL REFERS TO
NARRATIV^PSJLMUTL CALLED BY
NARRATIV^PSJLMUTL CALLS
NARRATIV^PSJLMUTL LOCKS
NARRATIV^PSJLMUTL LOCALS
NARRATIV^PSJLMUTL GLOBALS
NARRATIV^PSJLMUTL CODE
38 NARRATIV -- ; print inpatient/outpatient narratives 39 +1 N PSJCLHD 40 +2 S ^TMP("PSJALL",$J,PSJLN,0)="" D SETNAR("PSJALL",$G(^PS(55,DFN,5.3) ),"In") 41 +3 S ^TMP("PSJALL",$J,PSJLN+1,0)="" D SETNAR("PSJALL",$G(^PS(55,DFN,1) ),"Out") 42 +4 D SDA S PSJLN=0 F X=0:0 S X=$O(^TMP("PSJALL",$J,X)) Q:'X S PSJLN=P SJLN+1 43 +5 I '$G(PSJCLHD)!'$G(VALMCNT) S VALMCNT=PSJLN 44 +6 Q 45 +7 ;
SDA^PSJLMUTL
SDA^PSJLMUTL INTEGRATION AGREEMENTS
SDA^PSJLMUTL REFERENCED BY
SDA^PSJLMUTL REFERS TO
SDA^PSJLMUTL CALLED BY
SDA^PSJLMUTL CALLS
SDA^PSJLMUTL LOCKS
SDA^PSJLMUTL LOCALS
SDA^PSJLMUTL GLOBALS
SDA^PSJLMUTL CODE
46 SDA N PSJPAD,PSJCLIN,PSJCLINO,PSJAPD,PSJSCI,PSJCLOK,VAERR K ^TMP("PSJVS IT"),PSJDBUN S $P(PSJPAD," ",26)=" " 47 +1 Q:'$$PATCH^XPDUTL("SD*5.3*285") 48 +2 D NOW^%DTC S VASD("F")=$P(%,".")-1 49 +3 D SDA^VADPT S:$G(VAERR)=2 (PSJCLHD,PSJDBUN)=2 I $O(^UTILITY("VASD", $J,"")) M PSJUTL=^UTILITY("VASD",$J) D 50 +4 . S PSJSCDT0=0 51 +5 . F S PSJSCDT0=$O(PSJUTL(PSJSCDT0)) Q:'PSJSCDT0 D 52 +6 .. S PSJCLINO=$P($G(PSJUTL(PSJSCDT0,"E")),U,2),PSJCLIN=$P($G(PSJUTL (PSJSCDT0,"I")),U,2) 53 +7 .. S PSJSCI=$G(PSJUTL(PSJSCDT0,"I")),PSJAPD=$$FMTE^XLFDT(+PSJSCI) Q :(PSJCLIN="")!(PSJAPD="") 54 +8 .. S PSJCLOK=1 D SDAUTHCL^SDAMA203(PSJCLIN,.PSJCLOK) Q:(PSJCLOK<1) 55 +9 .. S ^TMP("PSJVSIT",$J,+PSJSCI,PSJCLIN,"V")=$E(PSJCLINO_PSJPAD,1,25 )_" "_$TR(PSJAPD,"@","/"),PSJCLHD=1 56 +10 .. D ENC(DFN,PSJCLIN) 57 +11 I $G(PSJCLHD) S PSJLN=PSJLN+1 S ^TMP("PSJALL",$J,PSJLN,0)="Clinic:" _$E(PSJPAD,1,20)_"Date/Time of Appointment:",PSJLN=PSJLN+1 I $G(PS JCLHD)=2 D 58 +12 . S ^TMP("PSJALL",$J,PSJLN,0)=" Scheduling database is unavailable" ,PSJLN=PSJLN+1 59 +13 N VDAT S VDAT=0 F S VDAT=$O(^TMP("PSJVSIT",$J,VDAT)) Q:'VDAT S VC LIN=0 F S VCLIN=$O(^TMP("PSJVSIT",$J,VDAT,VCLIN)) Q:'VCLIN D 60 +14 . F VTYP="E","V" S VDATA=$G(^TMP("PSJVSIT",$J,VDAT,VCLIN,VTYP)) I V DATA]"" S ^TMP("PSJALL",$J,PSJLN,0)=VDATA,PSJLN=PSJLN+1 61 +15 I $G(PSJCLHD) S VALMCNT=((PSJLN+11\11)*11),PSJX=$O(^TMP("PSJALL",$J ,9999),-1) ; F I=PSJX:1:VALMCNT S ^TMP("PSJALL",$J,I,0)="" 62 +16 K PSJUTL,PSJCLHD 63 +17 Q 64 +18 ;
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL INTEGRATION AGREEMENTS
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL REFERENCED BY
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL REFERS TO
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL CALLED BY
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL CALLS
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL LOCKS
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL LOCALS
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL GLOBALS
ENC(SDPATDFN,SDCLIEN)^PSJLMUTL CODE
65 ENC(SDPATDFN,SDCLIEN) -- ; 66 +1 N SDFROM,DT,SUBVIS,VIS S SDSTART=$$FMADD^XLFDT($P(PSGDT,"."),-1),SD END=$$FMADD^XLFDT($P(PSGDT,"."),+365) K ^TMP("VSIT",$J) 67 +2 D SELECTED^VSIT(SDPATDFN,SDSTART,SDEND,SDCLIEN) N VIS S VIS=0 F S VIS=$O(^TMP("VSIT",$J,VIS)) Q:'VIS D 68 +3 . S SUBVIS=0 F S SUBVIS=$O(^TMP("VSIT",$J,VIS,SUBVIS)) Q:'SUBVIS D 69 +4 .. S PSJSCI=$P(^TMP("VSIT",$J,VIS,SUBVIS),U),PSJAPD=$$FMTE^XLFDT(PS JSCI,1) Q:PSJSCI<1!(PSJAPD="") 70 +5 .. S ^TMP("PSJVSIT",$J,PSJSCI,PSJCLIN,"E")=$E(PSJCLINO_PSJPAD,1,25) _" "_$TR(PSJAPD,"@","/")_" *Encounter",PSJCLHD=1 71 +6 Q 72 +7 ;
SETNAR(SUB,NARR,TYPE)^PSJLMUTL
SETNAR(SUB,NARR,TYPE)^PSJLMUTL INTEGRATION AGREEMENTS
SETNAR(SUB,NARR,TYPE)^PSJLMUTL REFERENCED BY
SETNAR(SUB,NARR,TYPE)^PSJLMUTL REFERS TO
SETNAR(SUB,NARR,TYPE)^PSJLMUTL CALLED BY
SETNAR(SUB,NARR,TYPE)^PSJLMUTL CALLS
SETNAR(SUB,NARR,TYPE)^PSJLMUTL LOCKS
SETNAR(SUB,NARR,TYPE)^PSJLMUTL LOCALS
SETNAR(SUB,NARR,TYPE)^PSJLMUTL GLOBALS
SETNAR(SUB,NARR,TYPE)^PSJLMUTL CODE
73 SETNAR(SUB,NARR,TYPE) -- ; Set up Narrative info. 74 +1 S NARR=TYPE_"patient Narrative: "_NARR,Y="" S:TYPE="In" NARR=" "_NA RR 75 +2 S START=1 F D Q:NARR="" 76 +3 .I $L($P(NARR," "))>79 S PSJ=$E(NARR,START,START+79),NARR=$E(NARR,S TART+80,$L(NARR)) Q 77 +4 .I $L(NARR)>79 S PSJ=$P(NARR," ",1,$L($E(NARR,1,80)," ")-1),NARR=$E ($P(NARR,PSJ,2),2,$L(NARR)) D SET Q 78 +5 .S PSJ=NARR,NARR="" D SET 79 +6 Q 80 +7 ;
SET^PSJLMUTL
SET^PSJLMUTL INTEGRATION AGREEMENTS
SET^PSJLMUTL REFERENCED BY
SET^PSJLMUTL REFERS TO
SET^PSJLMUTL CALLED BY
SET^PSJLMUTL CALLS
SET^PSJLMUTL LOCKS
SET^PSJLMUTL LOCALS
SET^PSJLMUTL GLOBALS
SET^PSJLMUTL CODE
81 SET ; Set ^TMP for narratives. 82 +1 S ^TMP(SUB,$J,PSJLN,0)=PSJ,PSJLN=PSJLN+1 83 +2 Q 84 +3 ;
ACTIONS()^PSJLMUTL
ACTIONS()^PSJLMUTL INTEGRATION AGREEMENTS
ACTIONS()^PSJLMUTL REFERENCED BY
ACTIONS()^PSJLMUTL REFERS TO
ACTIONS()^PSJLMUTL CALLED BY
ACTIONS()^PSJLMUTL CALLS
ACTIONS()^PSJLMUTL LOCKS
ACTIONS()^PSJLMUTL LOCALS
ACTIONS()^PSJLMUTL GLOBALS
ACTIONS()^PSJLMUTL CODE
85 ACTIONS() -- ; 86 +1 N DIC,X,Y 87 +2 S Y=$P($G(^ORD(101,+$G(^ORD(101,DA(1),10,DA,0)),0)),U) I Y="" Q 0 88 +3 I Y="PSJ LM DC" Q $S(PSGACT["D":1,1:0) 89 +4 I Y="PSJU LM EDIT" Q $S(PSGACT["E":1,1:0) 90 +5 I Y="PSJU LM RENEW" Q $S(PSGACT["R":1,1:0) 91 +6 I Y="PSJ LM HOLD" Q $S(PSGACT["H":1,1:0) 92 +7 I Y="PSJU LM VERIFY" Q $S(PSGACT["V":1,1:0) 93 +8 I Y="PSJ LM EDIT NEW" Q $S(PSGACT["E":1,1:0) 94 +9 I Y="PSJ LM FLAG" Q $S(PSGACT["G":1,1:0) 95 +10 Q 1
RNACT()^PSJLMUTL
RNACT()^PSJLMUTL INTEGRATION AGREEMENTS
RNACT()^PSJLMUTL REFERENCED BY
RNACT()^PSJLMUTL REFERS TO
RNACT()^PSJLMUTL CALLED BY
RNACT()^PSJLMUTL CALLS
RNACT()^PSJLMUTL LOCKS
RNACT()^PSJLMUTL LOCALS
RNACT()^PSJLMUTL GLOBALS
RNACT()^PSJLMUTL CODE
96 RNACT() ; 97 +1 I '$G(PSJRNF),'$G(PSJIRNF) Q 0 98 +2 NEW X S X=$G(^PS(53.1,+PSJORD,0)) 99 +3 S PSGACT="" 100 +4 I $S(+$P(X,U,13):1,$G(PSJRNF)&($P(X,U,4)="U"):1,$G(PSJIRNF)&($P(X,U ,4)'="U"):1,1:0) S PSGACT="BFDE" 101 +5 NEW X,Y 102 +6 S Y=$P($G(^ORD(101,+$G(^ORD(101,DA(1),10,DA,0)),0)),U) I Y="" Q 0 103 +7 I Y="PSJ LM DC" Q $S(PSGACT["D":1,1:0) 104 +8 I Y="PSJ LM BYPASS" Q $S(PSGACT["B":1,1:0) 105 +9 I Y="PSJ LM FINISH" Q $S(PSGACT["F":1,1:0) 106 +10 I Y="PSJI LM DISCONTINUE" Q $S(PSGACT["D":1,1:0) 107 +11 I Y="PSJI LM EDIT" Q $S(PSGACT["E":1,1:0) 108 +12 I Y="PSJI LM FINISH" Q $S(PSGACT["F":1,1:0) 109 +13 I Y="PSJ LM FLAG" Q 0 110 +14 Q 1 111 +15 ;
TECHACT()^PSJLMUTL
TECHACT()^PSJLMUTL INTEGRATION AGREEMENTS
TECHACT()^PSJLMUTL REFERENCED BY
TECHACT()^PSJLMUTL REFERS TO
TECHACT()^PSJLMUTL CALLED BY
TECHACT()^PSJLMUTL CALLS
TECHACT()^PSJLMUTL LOCKS
TECHACT()^PSJLMUTL LOCALS
TECHACT()^PSJLMUTL GLOBALS
TECHACT()^PSJLMUTL CODE
112 TECHACT() -- ; Allowable actions for IV technician (PSJI PHARM TECH) 113 +1 Q:'$G(PSJITECH) 0 114 +2 NEW X S X=$G(^PS(53.1,+PSJORD,0)) 115 +3 I $S(+$P(X,U,13):1,$P(X,U,4)'="U":1,1:0) S PSGACT="F" 116 +4 N DIC,X,Y 117 +5 S Y=$P($G(^ORD(101,+$G(^ORD(101,DA(1),10,DA,0)),0)),U) I Y="" Q 0 118 +6 I Y="PSJ LM DC" Q $S(PSGACT["D":1,1:0) 119 +7 I Y="PSJ LM BYPASS" Q $S(PSGACT["B":1,1:0) 120 +8 I Y="PSJ LM FINISH" Q $S(PSGACT["F":1,1:0) 121 +9 I Y="PSJI LM DISCONTINUE" Q $S(PSGACT["D":1,1:0) 122 +10 I Y="PSJI LM EDIT" Q $S(PSGACT["E":1,1:0) 123 +11 I Y="PSJI LM FINISH" Q $S(PSGACT["F":1,1:0) 124 +12 I Y="PSJ LM FLAG" Q 0 125 +13 Q 1
PATINFO()^PSJLMUTL
PATINFO()^PSJLMUTL INTEGRATION AGREEMENTS
PATINFO()^PSJLMUTL REFERENCED BY
PATINFO()^PSJLMUTL REFERS TO
PATINFO()^PSJLMUTL CALLED BY
PATINFO()^PSJLMUTL CALLS
PATINFO()^PSJLMUTL LOCKS
PATINFO()^PSJLMUTL LOCALS
PATINFO()^PSJLMUTL GLOBALS
PATINFO()^PSJLMUTL CODE
126 PATINFO() -- ; Determines if detailed allergy info can be displayed. 127 +1 S Y=$P($G(^ORD(101,+$G(^ORD(101,DA(1),10,DA,0)),0)),U) I Y="" Q 0 128 +2 I Y="PSJ LM SHOW PROFILE",$D(PSJLMPRO) Q 0 129 +3 Q 1
HIDDEN(CHK)^PSJLMUTL
HIDDEN(CHK)^PSJLMUTL INTEGRATION AGREEMENTS
HIDDEN(CHK)^PSJLMUTL REFERENCED BY
HIDDEN(CHK)^PSJLMUTL REFERS TO
HIDDEN(CHK)^PSJLMUTL CALLED BY
HIDDEN(CHK)^PSJLMUTL CALLS
HIDDEN(CHK)^PSJLMUTL LOCKS
HIDDEN(CHK)^PSJLMUTL LOCALS
HIDDEN(CHK)^PSJLMUTL GLOBALS
HIDDEN(CHK)^PSJLMUTL CODE
130 HIDDEN(CHK) -- ; Determines if certain Hidden actions are to be available. 131 +1 I CHK="JUMP",'$G(PSJPNV) D NA("Jump is only available through Non-V erified/Pending Orders option.") Q 0 132 +2 I CHK="SPEED",'$D(PSJUDPRF) D NA("Speed options are only available from the Unit Dose Order Entry Profile.") Q 0 133 +3 ;PSJ*5*198;GMZ;Remove copy function from this option 134 +4 I CHK="COPY",('$D(PSGACT)!($G(PSGACT)="")) D NA("Copy is not allowe d from this option.") Q 0 135 +5 Q 1 136 +6 ;
NA(TXT)^PSJLMUTL
NA(TXT)^PSJLMUTL INTEGRATION AGREEMENTS
NA(TXT)^PSJLMUTL REFERENCED BY
NA(TXT)^PSJLMUTL REFERS TO
NA(TXT)^PSJLMUTL CALLED BY
NA(TXT)^PSJLMUTL CALLS
NA(TXT)^PSJLMUTL LOCKS
NA(TXT)^PSJLMUTL LOCALS
NA(TXT)^PSJLMUTL GLOBALS
NA(TXT)^PSJLMUTL CODE
137 NA(TXT) ; 138 +1 D FULL^VALM1 W !!,TXT,!! N DIR S DIR(0)="E" D ^DIR 139 +2 Q 140 +3 ;
UPR(DFN)^PSJLMUTL
UPR(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
UPR(DFN)^PSJLMUTL REFERENCED BY
UPR(DFN)^PSJLMUTL REFERS TO
UPR(DFN)^PSJLMUTL CALLED BY
UPR(DFN)^PSJLMUTL CALLS
UPR(DFN)^PSJLMUTL LOCKS
UPR(DFN)^PSJLMUTL LOCALS
UPR(DFN)^PSJLMUTL GLOBALS
UPR(DFN)^PSJLMUTL CODE
141 UPR(DFN) -- ; UPDATE PATIENT SPECIFIC DATA IN 55 142 +1 N DIE,DR S PSJC10=VALMCNT 143 +2 S DA=DFN,DIE="^PS(55,",DR="62.2;62.01" D ^DIE,DISALL^PSJLMUTL(DFN) 144 +3 S VALMCNT=PSJC10 K PSJC10 145 +4 Q 146 +5 ;
DETALL(DFN)^PSJLMUTL
DETALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
DETALL(DFN)^PSJLMUTL REFERENCED BY
DETALL(DFN)^PSJLMUTL REFERS TO
DETALL(DFN)^PSJLMUTL CALLED BY
DETALL(DFN)^PSJLMUTL CALLS
DETALL(DFN)^PSJLMUTL LOCKS
DETALL(DFN)^PSJLMUTL LOCALS
DETALL(DFN)^PSJLMUTL GLOBALS
DETALL(DFN)^PSJLMUTL CODE
147 DETALL(DFN) -- ; Enter Detailed Allergy Display list. 148 +1 D EN^VALM("PSJ LM ALLERGY DISPLAY") 149 +2 Q
BRFALL(DFN)^PSJLMUTL
BRFALL(DFN)^PSJLMUTL INTEGRATION AGREEMENTS
BRFALL(DFN)^PSJLMUTL REFERENCED BY
BRFALL(DFN)^PSJLMUTL REFERS TO
BRFALL(DFN)^PSJLMUTL CALLED BY
BRFALL(DFN)^PSJLMUTL CALLS
BRFALL(DFN)^PSJLMUTL LOCKS
BRFALL(DFN)^PSJLMUTL LOCALS
BRFALL(DFN)^PSJLMUTL GLOBALS
BRFALL(DFN)^PSJLMUTL CODE
150 BRFALL(DFN) -- ; 151 +1 D EN^VALM("PSJ LM BRIEF PATIENT INFO") 152 +2 Q
PAUSE^PSJLMUTL
PAUSE^PSJLMUTL INTEGRATION AGREEMENTS
PAUSE^PSJLMUTL REFERENCED BY
PAUSE^PSJLMUTL REFERS TO
PAUSE^PSJLMUTL CALLED BY
PAUSE^PSJLMUTL CALLS
PAUSE^PSJLMUTL LOCKS
PAUSE^PSJLMUTL LOCALS
PAUSE^PSJLMUTL GLOBALS
PAUSE^PSJLMUTL CODE
153 PAUSE ; 154 +1 N DIR S DIR(0)="E" D ^DIR 155 +2 Q
DRUGNAME(DFN,ON)^PSJLMUTL
DRUGNAME(DFN,ON)^PSJLMUTL INTEGRATION AGREEMENTS
DRUGNAME(DFN,ON)^PSJLMUTL REFERENCED BY
DRUGNAME(DFN,ON)^PSJLMUTL REFERS TO
DRUGNAME(DFN,ON)^PSJLMUTL CALLED BY
DRUGNAME(DFN,ON)^PSJLMUTL CALLS
DRUGNAME(DFN,ON)^PSJLMUTL LOCKS
DRUGNAME(DFN,ON)^PSJLMUTL LOCALS
DRUGNAME(DFN,ON)^PSJLMUTL GLOBALS
DRUGNAME(DFN,ON)^PSJLMUTL CODE
156 DRUGNAME(DFN,ON) -- ; Find drug name to display 157 +1 ;If order is in 55: 158 +2 ;.If Dosage Ordered is found, returns OI_U_Dosage Ordered. 159 +3 ;.If no Dosage Ordered, returns Dispense Drug only. 160 +4 ;If order in 53.1: 161 +5 ;.If Dosage Ordered, returns OI_U_Dosage Ordered. 162 +6 ;.If Dispense Drug is found, returns Dispense Drug name_U_Instructi ons. 163 +7 ;.If no dispense drug, returns OI_U_Instructions. 164 +8 I ON["U" D Q DN 165 +9 .S OIND=$G(^PS(55,DFN,5,+ON,.2)) 166 +10 .I $P(OIND,U,2)]"",($G(^PS(50.7,+OIND,0))]"") S DN=$$OINAME(OIND)_U _.2 Q 167 +11 .S X=+$O(^PS(55,DFN,5,+ON,1,0)),X=$G(^PS(55,DFN,5,+ON,1,X,0)) I $P( X,U)]"" S DN=$$DDNAME(+X)_"^^"_$P(X,"^",2) Q ;$S($P(OIND,U,2)]"": .2,1:.3) Q 168 +12 .S DN=$$OINAME(+OIND)_U_.3 Q 169 +13 S OIND=$G(^PS(53.1,+ON,.2)) Q:$P(OIND,U,2)]"" $$OINAME(OIND)_U_.2 170 +14 S X=+$O(^PS(53.1,+ON,1,0)) I X,'$O(^PS(53.1,+ON,1,X)) S X=$G(^PS(53 .1,+ON,1,X,0)) I $P(X,U)]"" Q $$DDNAME(+X)_U_.3_$P(X,"^",2) 171 +15 Q $$OINAME(OIND)_U_.3 172 +16 ;
DDNAME(X)^PSJLMUTL
DDNAME(X)^PSJLMUTL INTEGRATION AGREEMENTS
DDNAME(X)^PSJLMUTL REFERENCED BY
DDNAME(X)^PSJLMUTL REFERS TO
DDNAME(X)^PSJLMUTL CALLED BY
DDNAME(X)^PSJLMUTL CALLS
DDNAME(X)^PSJLMUTL LOCKS
DDNAME(X)^PSJLMUTL LOCALS
DDNAME(X)^PSJLMUTL GLOBALS
DDNAME(X)^PSJLMUTL CODE
173 DDNAME(X) -- ; 174 +1 Q $$FOUND($P($G(^PSDRUG(+X,0)),U),X,"PSDRUG(,") 175 +2 ;
OINAME(ND)^PSJLMUTL
OINAME(ND)^PSJLMUTL INTEGRATION AGREEMENTS
OINAME(ND)^PSJLMUTL REFERENCED BY
OINAME(ND)^PSJLMUTL REFERS TO
OINAME(ND)^PSJLMUTL CALLED BY
OINAME(ND)^PSJLMUTL CALLS
OINAME(ND)^PSJLMUTL LOCKS
OINAME(ND)^PSJLMUTL LOCALS
OINAME(ND)^PSJLMUTL GLOBALS
OINAME(ND)^PSJLMUTL CODE
176 OINAME(ND) -- ; Return Orderable Item Name_" "_Dose Form_U_Dosage Ordered 177 +1 N DF,DNME,X 178 +2 S X=$G(^PS(50.7,+ND,0)),DNME="" S:X]"" DF=$P($G(^PS(50.606,+$P(X,U, 2),0)),U),DNME=$P(X,U)_" "_DF 179 +3 Q $$FOUND(DNME,+ND,"PS(50.7") 180 +4 ;
FOUND(DNME,DN,FN)^PSJLMUTL
FOUND(DNME,DN,FN)^PSJLMUTL INTEGRATION AGREEMENTS
FOUND(DNME,DN,FN)^PSJLMUTL REFERENCED BY
FOUND(DNME,DN,FN)^PSJLMUTL REFERS TO
FOUND(DNME,DN,FN)^PSJLMUTL CALLED BY
FOUND(DNME,DN,FN)^PSJLMUTL CALLS
FOUND(DNME,DN,FN)^PSJLMUTL LOCKS
FOUND(DNME,DN,FN)^PSJLMUTL LOCALS
FOUND(DNME,DN,FN)^PSJLMUTL GLOBALS
FOUND(DNME,DN,FN)^PSJLMUTL CODE
181 FOUND(DNME,DN,FN) -- ; 182 +1 Q $S(DNME]"":DNME,1:"NOT FOUND "_DN_";"_FN)