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

PSJDPT.m

Go to the documentation of this file.
  1. PSJDPT ;BIR/JLC - CENTRALIZED PATIENT LOOKUP FOR IPM ;29-May-2012 14:38;PLS
  1. ;;5.0; INPATIENT MEDICATIONS ;**53,1003,124,166,160,198,1015**;16 DEC 97;Build 62
  1. ;
  1. ; Reference to ^DPT is supported by DBIA 10035
  1. ; Reference to ^DGSEC4 is supported by DBIA 3027
  1. ; Reference to ^DIC is supported by DBIA 10006
  1. ; Reference to ^DICN is supported by DBIA 10009
  1. ; Reference to ^DPTLK is supported by DBIA 3787
  1. ; Reference to ^DPTLK1 is supported by DBIA 3266
  1. ; Reference to DISPPRF^DGPFAPI is supported by DBIA 4563
  1. ; Reference to GETACT^DGPFAPI is supported by DBIA 3860
  1. ; Reference to ^ORRDI1 is supported by DBIA 4659.
  1. ; Reference to ^XTMP("ORRDI" is supported by DBIA 4660.
  1. ;
  1. ; Modified - IHS/MSC/PLS - 05/10/10 - Line EN+1
  1. EN ; MAIN ENTRY POINT FOR PATIENT LOOKUP
  1. ;K DIC S DIC="^DPT(",DIC("W")="D DPT^PSJDPT",DIC(0)="QEMZ" D ^DPTLK K DIC ;IHS/MSC/PLS - 05/10/10 - Commented out
  1. K DIC S DIC="^DPT(",DIC("W")="D DPT^PSJDPT",DIC(0)="QEMZ" D ^DIC K DIC
  1. I $$BADADR^DGUTL3(+Y) H 2
  1. N Y
  1. D
  1. . ;PSJ*5.0*198;GMZ;Don't print remote data msg on view profile only menu options
  1. . I $T(HAVEHDR^ORRDI1)]"",$$HAVEHDR^ORRDI1,$D(^XTMP("ORRDI","OUTAGE INFO","DOWN")),'$G(PSJNODIS) W !,"Remote data not available - Only local order checks processed." D PAUSE^PSJLMUT1
  1. Q
  1. CHK(Y,DISP,PAUSE) N RESULT,RES,CHKY,PSGTEMP
  1. S DISP=$G(DISP),PAUSE=$G(PAUSE)
  1. I $G(XQY0)["PSJI COMPLETE",$$GETACT^DGPFAPI(+Y,"PSGTEMP") K PSGTEMP W @IOF,"PATIENT: ",$P(Y,U,2)
  1. S CHKY=Y D DISPPRF^DGPFAPI(Y) S Y=CHKY K CHKY
  1. D PTSEC^DGSEC4(.RESULT,$P(Y,"^"),1)
  1. I RESULT(1)'=0 D
  1. . W !! I DISP W ?(80-$L($P(Y,"^",2)))\2,$P(Y,"^",2),!
  1. . F I=2:1:9 I $D(RESULT(I)) W ?(80-$L(RESULT(I)))\2,RESULT(I),!
  1. . I RESULT(1)'=0,RESULT(1)'=2,PAUSE H 2
  1. . Q:RESULT(1)=1
  1. . I RESULT(1)=-1!(RESULT(1)=3)!(RESULT(1)=4) S Y=-1 Q
  1. . I RESULT(1)=2 D ENCONT I Y=-1 Q
  1. . D NOTICE^DGSEC4(.RES,Y,XQY0,$S(RESULT(1)=1:1,1:3)) I RES=0 S Y=-1 Q
  1. Q
  1. ENCONT W !,"Do you want to continue processing this patient record"
  1. S %=2 D YN^DICN I %<0!(%=2) S Y=-1
  1. I '% W !!,"Enter 'YES' to continue processing, or 'NO' to quit processing this record." G ENCONT
  1. Q
  1. DPT I $$DOB^DPTLK1(Y)["*SENSITIVE" G SENS
  1. S ND=$S($D(^DPT(Y,0)):^(0),1:""),NB=$P(ND,"^",3),NS=$P(ND,"^",9)
  1. I NS W ?42,$E(NS,1,3),"-",$E(NS,4,5),"-",$E(NS,6,10)," "
  1. I NB W ?55,$E(NB,4,5),"/",$E(NB,6,7),"/",$E(NB,2,3)," "
  1. I $D(^DPT(Y,.1)) W ?67,$P(^(.1),"^")
  1. Q
  1. SENS W ?42,"*SENSITIVE* ",?55,"*SENSITIVE* ",?67,"*SENSITIVE*" Q