source: FOIAVistA/tag/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/VSITASK.m@ 628

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1VSITASK ;ISD/RJP - Prompt User ;6/20/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
3 ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
4 ; the incorporation of the module into PCE. For historical reference,
5 ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
6 ; patches.
7 ;
8 ;;2.0;VISIT TRACKING;;Aug 12, 1996;
9 ;
10VSIT(DFN,LST) ; - prompt user to select visit
11 ; - called by VSIT
12 ;
13 ; - pass DFN = <patient record number>
14 ; LST = <passed by reference, array of matching visits VSITGET>
15 ; - rtns = <visit record # selected>
16 ;
17 N X,Y,NOD,VSITI,X1,X2,DIR
18 D:$D(DFN)&$D(LST)
19 . S X="Visits for "_$P(^DPT(DFN,0),"^")
20 . S Y="",$P(Y,"-",$L(X)+1)="" W !,X,!,Y,!
21 . F VSITI=1:1:LST S NOD=$G(LST(VSITI)) Q:NOD="" D
22 . . D FMT(+$P(NOD,"|"))
23 . . W $J(VSITI,2)_" - ",?5,X1,!,?5,X2,!
24 . S DIR(0)="NA^1:"_LST
25 . S DIR("A")="Select Visit (1-"_LST_"): "
26 . S DIR("B")="1" D ^DIR
27 Q $G(Y)
28 ;
29FMT(IEN) ; - format display lines for a visit
30 ;
31 ; - pass IEN = <visit record #>
32 ; - rtns X1,X2 = <formatted display lines>
33 ;
34 N VSITI,VSIT,X,Y
35 S IEN=$G(IEN),(X1,X2)=""
36 D SLC^VSITVAR(IEN,"VDT^SVC^INS^TYP^ELG^LOC^DSS","E")
37 S X=$P(VSIT("VDT"),"^",2),X1=X_$E($J("",80),$L(X)+1,27)
38 S X=$E($P(VSIT("SVC"),"^",2),1,18),X1=X1_X_" "
39 S X=$E($P(VSIT("INS"),"^",2),1,18),X1=X1_X_" "
40 S X=$E($P($P(VSIT("TYP"),"^",2)," "),1,8),X1=X1_"("_X_")"
41 S X=$S($P(VSIT("ELG"),"^",2)]"":" Elig: ",1:"")_$E($P(VSIT("ELG"),"^",2),1,13),X2=X2_X_$E($J("",80),$L(X)+1,22)
42 S X="Loc: "_$E($P(VSIT("LOC"),"^",2),1,18),X2=X2_X_$E($J("",80),$L(X)+1,20)
43 S X="Cat: "_$E($P(VSIT("DSS"),"^",2),1,18),X2=X2_X_$E($J("",80),$L(X)+1,20)
44 Q
45 ;
46ELG(PAT) ; - prompt user to select pt. eligibility
47 ; - called by VSITCK1
48 ;
49 ; - pass PAT = <patient record number>
50 ; rtns = <selected eligibility>
51 ;
52 N X,Y,DIC,D,DZ S PAT=$$GET^VSITVAR("PAT",PAT,"B")
53 S X="Eligibilities for "_$P(PAT,"^",2)
54 S Y="",$P(Y,"-",$L(X)+1)="" W !,X,!,Y
55 S DIC(0)="AEQMZ",DIC="^DIC(8,"
56 S DIC("S")="I $D(^DPT(+PAT,""E"",+Y,0))"
57 I $G(^DPT(+PAT,.36)) S DIC("B")=$P(^DIC(8,+^(.36),0),"^")
58 S DIC("A")="Select Eligibility for this Visit: "
59 S D="B",DZ="??" D DQ^DICQ K D,DZ F D ^DIC Q:Y>0 W " Required!"
60 Q $P(Y,"^")
Note: See TracBrowser for help on using the repository browser.