source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSODPT.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1PSODPT ;BIR/MFR - CENTRALIZED PATIENT LOOKUP FOR OP ;07/15/03
2 ;;7.0;OUTPATIENT PHARMACY;**139,185**;DEC 1997
3 ;Ref. ^DGSEC4 supp. IA 3027
4 ;Ref. MPIQQ^MPIFAPI supp. IA 3300
5 ;
6CHK(DFN,DISP,PAUSE) ; Security Check for Patient Selection
7 ;Input: DFN - Patient IEN ^ Patient Name
8 ; DISP - Display Messages Flag
9 ; PAUSE - Pause Flag
10 N RESULT,RES,CHK
11 S DISP=$G(DISP),PAUSE=$G(PAUSE),CHK=+DFN D ICN(CHK)
12 D PTSEC^DGSEC4(.RESULT,$P(DFN,"^"),1)
13 I RESULT(1)'=0 D
14 . W !! I DISP W ?(80-$L($P(DFN,"^",2)))\2,$P(DFN,"^",2),!
15 . F I=2:1:9 I $D(RESULT(I)) W ?(80-$L(RESULT(I)))\2,RESULT(I),!
16 . I RESULT(1)'=0,RESULT(1)'=2,PAUSE H 1
17 . Q:RESULT(1)=1
18 . I RESULT(1)=-1!(RESULT(1)=3)!(RESULT(1)=4) S CHK=-1 Q
19 . I RESULT(1)=2 D ENCONT I CHK=-1 Q
20 . D NOTICE^DGSEC4(.RES,DFN,XQY0,$S(RESULT(1)=1:1,1:3))
21 . I RES=0 S CHK=-1 Q
22 H 1 Q CHK
23ENCONT W !,"Do you want to continue processing this patient record"
24 S %=2 D YN^DICN I %<0!(%=2) S CHK=-1
25 I '% W !!,"Enter 'YES' to continue processing, or 'NO' to quit processing this record." G ENCONT
26 Q
27MSG ;
28 W !,$C(7),"Outpatient Division MUST be selected!",!
29 Q
30ICN(X) ;
31 Q:'$G(X)
32 Q:'$D(^DPT(X,0))
33 I +$$GETICN^MPIF001(X)<1 N Y S Y=$$MPIQQ^MPIFAPI(X) K Y
34 Q
Note: See TracBrowser for help on using the repository browser.