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

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

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1PXCEEXP ;ISL/dee - Main routine for the List Manager display for encounter profile of a visit and related v-files ;6/20/96
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**172**;Aug 12, 1996
3 ;;
4 Q
5EN ; -- main entry point for PXCE ENCOUNTER PROFILE
6 N PXCEVIEN,PXCEQUIT
7 I PXCEVIEW["V" D
8 . D GETVIEN^PXCEAE
9 E I PXCEVIEW["A" D
10 . S PXCEVIEN=$$SELAPPM^PXCESDAM
11 . S:'PXCEVIEN PXCEVIEN=0
12 E Q
13EN1 ;
14 I $G(PXCEVIEN)'>0 D G QUIT
15 . W !!,"There is no data stored in PCE to display."
16 . D WAIT^PXCEHELP
17 N PXCEAEVW
18 I '$D(PXCEPAT) N PXCEKPAT D
19 . S PXCEKPAT=1
20 . S PXCEPAT=$P($G(^AUPNVSIT(PXCEVIEN,0)),"^",5)
21 . D PATINFO^PXCEPAT(.PXCEPAT)
22 S PXCEAEVW="D"
23 ; next 3 lines added per PX*1.0*172
24 N PXPTSSN,PXREC,PXDUZ S PXDUZ=DUZ,PXPTSSN=$TR($G(PXCEPAT("SSN")),"-")
25 D SEC(.PXREC,PXDUZ,PXPTSSN)
26 I PXREC W !!,"Security regulations prohibit computer access to your own medical record." H 3 G QUIT
27 D EN^VALM("PXCE ENCOUNTER PROFILE")
28QUIT ;
29 D MAKELIST^PXCENEW,DONE^PXCE
30 Q
31 ;
32SEC(PXREC,PXDUZ,PXPTSSN) ; added per PX*1.0*172
33 N PXNPSSN S PXREC=0
34 S PXNPSSN=$$GET1^DIQ(200,PXDUZ_",",9,"I","","PXNPERR")
35 I PXNPSSN=PXPTSSN S PXREC=1
36 Q
37 ;
38HDR ; -- header code
39 K VALMHDR
40 N VISIT0
41 ;
42 ;PATIENT
43 S VISIT0=^AUPNVSIT(PXCEVIEN,0)
44 S VALMHDR(1)=$E(PXCEPAT("NAME"),1,26)
45 S VALMHDR(1)=$E(VALMHDR(1)_$E(" ",1,(27-$L(VALMHDR(1))))_PXCEPAT("SSN")_" ",1,40)
46 S VALMHDR(1)=VALMHDR(1)_"Clinic: "_$S($P(VISIT0,"^",22)>0:$P(^SC($P(VISIT0,"^",22),0),"^"),1:"")
47 ;
48 ;DATE
49 S VALMHDR(2)=$E("Encounter Date "_$S($P(VISIT0,"^",1)>0:$$DATE^PXCEDATE($P(VISIT0,"^",1)),1:"")_" ",1,40)
50 S VALMHDR(2)=VALMHDR(2)_"Clinic Stop: "_$S($P(VISIT0,"^",8)>0:$$DISPLY08^PXCECSTP($P(VISIT0,"^",8)),1:"")
51 ;
52 S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
53 Q
54 ;
55INIT ; -- init variables and list array
56 D BUILD^PXCEAE1(PXCEVIEN,PXCEAEVW,"^TMP(""PXCEAE"",$J)","^TMP(""PXCEAEIX"",$J)")
57 I '$D(VALMBCK) K VALMHDR S VALMBCK="R"
58 Q
59 ;
60HELP ; -- help code
61 S X="?" D DISP^XQORM1 W !!
62 Q
63 ;
64EXIT ; -- exit code
65 D CLEAN^VALM10
66 K ^TMP("PXCEAE",$J),^TMP("PXCEAEIX",$J)
67 D:$D(PXCEKPAT) PATKILL^PXCEPAT
68 K PXCEVIEN
69 Q
70 ;
71EXPND ; -- expand code
72 S VALMBG=1
73 S PXCEAEVW=$S(PXCEAEVW="D":"B",1:"D")
74 D BUILD^PXCEAE1(PXCEVIEN,PXCEAEVW,"^TMP(""PXCEAE"",$J)","^TMP(""PXCEAEIX"",$J)")
75 D DONE^PXCE
76 Q
77 ;
Note: See TracBrowser for help on using the repository browser.