source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXBGPRV4.m@ 949

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1PXBGPRV4 ;ISL/JVS - DOUBLE ?? GATHERING OF FORM PROVIDERS ; 5/7/03 3:36pm
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**7,11,121**;Aug 12, 1996
3 ;
4 ;
5 ;
6 W !,"THIS IS NOT AN ENTRY POINT" Q
7 ;
8 ;
9DOUBLE1(FROM) ;--Entry point
10 ;
11NEW ;
12 ;
13 N FILE,FIELD,TITLE,HEADING,SUB,CODE,NAME,START,SCREEN,CNT,OK,INDEX,CYCLE
14 N TOTAL,PRV,CNT,PXBPMT,CODE,SUB2
15 ;---SETUP VARIABLES
16 S BACK="",INDEX=""
17 S START=DATA,SUB=0,SUB2=0
18 ;
19START1 ;--RECYCLE POINT
20 S TITLE="- - F O R M P R O V I D E R S - -"
21 ;
22 D GETLST^IBDF18A(CLINIC,$P($T(PRV^PXBAICS),";;",2),"PXBPMT",,,,IDATE)
23TEST ;
24 S TOTAL=PXBPMT(0)
25 I PXBPMT(0)>0 D
26 .S SUB=1,CNT="" F S SUB=$O(PXBPMT(SUB)) Q:SUB="" D
27 ..S NAME=$P($G(PXBPMT(SUB)),"^",2)
28 ..S CNT=CNT+1
29 ..S ^TMP("PXBTOTAL",$J,"DILIST","ID",CNT,.01)=NAME
30 ..S ^TMP("PXBTOTAL",$J,"DILIST",2,CNT)=$P($G(PXBPMT(SUB)),"^",1)
31 I $D(CNT) S TOTAL=CNT
32 ;
33 ;--DISPLAY IF NO MATCH FOUND
34 I TOTAL=0 W IOCUU,IOCUU,!,IOELEOL D
35 .D LOC W !
36 .S RESULTS="NO PROVIDER BLOCKS EXIST FOR AN ENCOUNTER FORM" W !!!,?(IOM-$L(RESULTS))\2,RESULTS D HELP1^PXBUTL1("CON") R OK:DTIME
37 I TOTAL=0 Q TOTAL
38 ;
39 ;
40 ;----DISPLAY LIST TO THE SCREEN
41 S HEADING="W !,""ITEM"",?6,""NAME"",IOINHI,TOTAL,"" ENTRIES"",IOINLOW,?30,"" PERSON CLASS IN NEW PERSON FILE"""
42LIST ;-DISPLAY LIST TO THE SCREEN
43 D LOC W !
44 X HEADING
45 S SUB=SUB-1
46 S NUM=0 F S SUB=$O(^TMP("PXBTOTAL",$J,"DILIST","ID",SUB)) S NUM=NUM+1 Q:NUM=11 Q:SUB'>0 S SUB2=SUB2+1 D
47 .S NAME=$G(^TMP("PXBTOTAL",$J,"DILIST","ID",SUB,.01))
48 .S TYPE=$$OCCUP^PXBGPRV($G(^TMP("PXBTOTAL",$J,"DILIST",2,SUB)),+$P($G(^AUPNVSIT(PXBVST,0)),"^",1),"",2) D
49 ..N Y,DATE
50 ..S Y=+$P($G(^AUPNVSIT(PXBVST,0)),"^",1) X ^DD("DD") S DATE=$P(Y,"@",1)
51 ..I +TYPE=-2 S TYPE="*** CLASS not 'ACTIVE' on "_DATE_"***"
52 ..I +TYPE=-1 S TYPE=""
53 .W !,SUB,?6,$E(NAME,1,20),?30,$E(TYPE,1,45)
54 ;
55 ;----If There is only one selection go to proper prompting
56 I TOTAL=1 G PRMPT2
57 ;
58PRMPT ;---WRITE PROMPT HERE
59 D WIN17^PXBCC(PXBCNT)
60 D LOC^PXBCC(15,1)
61 W !
62 I SUB>0 W !,"Enter '^' to quit"
63 E I TOTAL>10 W !," END OF LIST"
64 I SUB>0 S DIR("A")="Select a single 'ITEM NUMBER' or 'RETURN' to continue: "
65 E S DIR("A")="Select a single 'ITEM NUMBER' or 'RETURN' to exit: "
66 S DIR("?")="Enter ITEM 'No' to select , '^' to quit"
67 S DIR(0)="N,A,O^0:"_SUB2_":0^I X'?.1""^"".N K X"
68 D ^DIR
69 I X="",SUB>0 G LIST
70 I X="",SUB'>0 S X="^"
71 I $G(DIRUT) K DIRUT S VAL="^P" G EXITNEW
72VAL ;-----Set the VAL equal to the value
73 S VAL=$G(^TMP("PXBTOTAL",$J,"DILIST",2,X))_"^"_$G(^TMP("PXBTOTAL",$J,"DILIST","ID",X,.01))
74EXITNEW ;--EXIT
75 K DIR,^TMP("PXBTANA",$J),^TMP("PXBTOTAL",$J)
76 K TANA,TOTAL
77 Q VAL
78 Q
79 ;
80 ;-----------------SUBROUTINES--------------
81BACK ;
82 S START=$G(^TMP("PXBTANA",$J,"DILIST",1,1))
83 S START("IEN")=$G(^TMP("PXBTANA",$J,"DILIST",2,1))
84 Q
85FORWARD ;
86 S START=$G(^TMP("PXBTANA",$J,"DILIST",1,10))
87 S START("IEN")=$G(^TMP("PXBTANA",$J,"DILIST",2,10))
88 Q
89LOC ;--LOCATE CURSOR
90 D LOC^PXBCC(3,1) ;--LOCATE THE CURSOR
91 W IOEDEOP ;--CLEAR THE PAGE
92 Q
93HEAD ;--HEAD
94 W !,IOCUU,IOBON,"HELP SCREEN",IOSGR0,?(IOM-$L(TITLE))\2,IOINHI,TITLE,IOINLOW,IOELEOL
95 Q
96SUB ;--DISPLAY LIST TO THE SCREEN
97 I $P(^TMP("PXBTANA",$J,"DILIST",0),"^",1)=0 W !!," E N D O F L I S T" Q
98 X HEADING
99 S SUB=0,CNT=0 F S SUB=$O(^TMP("PXBTANA",$J,"DILIST","ID",SUB)) Q:SUB'>0 S CNT=CNT+1 D
100 .S NAME=$G(^TMP("PXBTANA",$J,"DILIST","ID",SUB,.01))
101 .W !,SUB,?6,NAME
102 Q
103SETUP ;-SETP VARIABLES
104 S FILE=200,FIELD=.01
105 S HEADING="W !,""ITEM"",?6,""NAME"""
106 Q
107PRMPT2 ;-----Yes and No prompt if onlyi choice
108 D WIN17^PXBCC(PXBCNT)
109 D LOC^PXBCC(15,1)
110 S DIR("A")="Is this the correct entry "
111 S DIR("B")="YES"
112 S DIR(0)="Y"
113 D ^DIR
114 I Y=0 S X="^"
115 I Y=1 S X=1
116 G VAL
Note: See TracBrowser for help on using the repository browser.