PXCEEXP ;ISL/dee - Main routine for the List Manager display for encounter profile of a visit and related v-files ;6/20/96
;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
;; ;
Q
EN ; -- main entry point for PXCE ENCOUNTER PROFILE
N PXCEVIEN,PXCEQUIT
I PXCEVIEW["V" D
. D GETVIEN^PXCEAE
E I PXCEVIEW["A" D
. S PXCEVIEN=$$SELAPPM^PXCESDAM
. S:'PXCEVIEN PXCEVIEN=0
E Q
EN1 ;
I $G(PXCEVIEN)'>0 D G QUIT
. W !!,"There is no data stored in PCE to display."
. D WAIT^PXCEHELP
N PXCEAEVW
I '$D(PXCEPAT) N PXCEKPAT D
. S PXCEKPAT=1
. S PXCEPAT=$P($G(^AUPNVSIT(PXCEVIEN,0)),"^",5)
. D PATINFO^PXCEPAT(.PXCEPAT)
S PXCEAEVW="D"
;
D EN^VALM("PXCE ENCOUNTER PROFILE")
QUIT ;
D MAKELIST^PXCENEW,DONE^PXCE
Q
;
HDR ; -- header code
K VALMHDR
N VISIT0
;
;PATIENT
S VISIT0=^AUPNVSIT(PXCEVIEN,0)
S VALMHDR(1)=$E(PXCEPAT("NAME"),1,26)
S VALMHDR(1)=$E(VALMHDR(1)_$E(" ",1,(27-$L(VALMHDR(1))))_PXCEPAT("SSN")_" ",1,40)
S VALMHDR(1)=VALMHDR(1)_"Clinic: "_$S($P(VISIT0,"^",22)>0:$P(^SC($P(VISIT0,"^",22),0),"^"),1:"")
;
;DATE
S VALMHDR(2)=$E("Encounter Date "_$S($P(VISIT0,"^",1)>0:$$DATE^PXCEDATE($P(VISIT0,"^",1)),1:"")_" ",1,40)
S VALMHDR(2)=VALMHDR(2)_"Clinic Stop: "_$S($P(VISIT0,"^",8)>0:$$DISPLY08^PXCECSTP($P(VISIT0,"^",8)),1:"")
;
S VALMSG="+ Next Screen - Prev Screen ?? More Actions"
Q
;
INIT ; -- init variables and list array
D BUILD^PXCEAE1(PXCEVIEN,PXCEAEVW,"^TMP(""PXCEAE"",$J)","^TMP(""PXCEAEIX"",$J)")
I '$D(VALMBCK) K VALMHDR S VALMBCK="R"
Q
;
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ; -- exit code
D CLEAN^VALM10
K ^TMP("PXCEAE",$J),^TMP("PXCEAEIX",$J)
D:$D(PXCEKPAT) PATKILL^PXCEPAT
K PXCEVIEN
Q
;
EXPND ; -- expand code
S VALMBG=1
S PXCEAEVW=$S(PXCEAEVW="D":"B",1:"D")
D BUILD^PXCEAE1(PXCEVIEN,PXCEAEVW,"^TMP(""PXCEAE"",$J)","^TMP(""PXCEAEIX"",$J)")
D DONE^PXCE
Q
;
PXCEEXP ;ISL/dee - Main routine for the List Manager display for encounter profile of a visit and related v-files ;6/20/96
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
+2 ;; ;
+3 QUIT
EN ; -- main entry point for PXCE ENCOUNTER PROFILE
+1 NEW PXCEVIEN,PXCEQUIT
+2 IF PXCEVIEW["V"
Begin DoDot:1
+3 DO GETVIEN^PXCEAE
End DoDot:1
+4 IF '$TEST
IF PXCEVIEW["A"
Begin DoDot:1
+5 SET PXCEVIEN=$$SELAPPM^PXCESDAM
+6 IF 'PXCEVIEN
SET PXCEVIEN=0
End DoDot:1
+7 IF '$TEST
QUIT
EN1 ;
+1 IF $GET(PXCEVIEN)'>0
Begin DoDot:1
+2 WRITE !!,"There is no data stored in PCE to display."
+3 DO WAIT^PXCEHELP
End DoDot:1
GOTO QUIT
+4 NEW PXCEAEVW
+5 IF '$DATA(PXCEPAT)
NEW PXCEKPAT
Begin DoDot:1
+6 SET PXCEKPAT=1
+7 SET PXCEPAT=$PIECE($GET(^AUPNVSIT(PXCEVIEN,0)),"^",5)
+8 DO PATINFO^PXCEPAT(.PXCEPAT)
End DoDot:1
+9 SET PXCEAEVW="D"
+10 ;
+11 DO EN^VALM("PXCE ENCOUNTER PROFILE")
QUIT ;
+1 DO MAKELIST^PXCENEW
DO DONE^PXCE
+2 QUIT
+3 ;
HDR ; -- header code
+1 KILL VALMHDR
+2 NEW VISIT0
+3 ;
+4 ;PATIENT
+5 SET VISIT0=^AUPNVSIT(PXCEVIEN,0)
+6 SET VALMHDR(1)=$EXTRACT(PXCEPAT("NAME"),1,26)
+7 SET VALMHDR(1)=$EXTRACT(VALMHDR(1)_$EXTRACT(" ",1,(27-$LENGTH(VALMHDR(1))))_PXCEPAT("SSN")_" ",1,40)
+8 SET VALMHDR(1)=VALMHDR(1)_"Clinic: "_$SELECT($PIECE(VISIT0,"^",22)>0:$PIECE(^SC($PIECE(VISIT0,"^",22),0),"^"),1:"")
+9 ;
+10 ;DATE
+11 SET VALMHDR(2)=$EXTRACT("Encounter Date "_$SELECT($PIECE(VISIT0,"^",1)>0:$$DATE^PXCEDATE($PIECE(VISIT0,"^",1)),1:"")_" ",1,40)
+12 SET VALMHDR(2)=VALMHDR(2)_"Clinic Stop: "_$SELECT($PIECE(VISIT0,"^",8)>0:$$DISPLY08^PXCECSTP($PIECE(VISIT0,"^",8)),1:"")
+13 ;
+14 SET VALMSG="+ Next Screen - Prev Screen ?? More Actions"
+15 QUIT
+16 ;
INIT ; -- init variables and list array
+1 DO BUILD^PXCEAE1(PXCEVIEN,PXCEAEVW,"^TMP(""PXCEAE"",$J)","^TMP(""PXCEAEIX"",$J)")
+2 IF '$DATA(VALMBCK)
KILL VALMHDR
SET VALMBCK="R"
+3 QUIT
+4 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 DO CLEAN^VALM10
+2 KILL ^TMP("PXCEAE",$JOB),^TMP("PXCEAEIX",$JOB)
+3 IF $DATA(PXCEKPAT)
DO PATKILL^PXCEPAT
+4 KILL PXCEVIEN
+5 QUIT
+6 ;
EXPND ; -- expand code
+1 SET VALMBG=1
+2 SET PXCEAEVW=$SELECT(PXCEAEVW="D":"B",1:"D")
+3 DO BUILD^PXCEAE1(PXCEVIEN,PXCEAEVW,"^TMP(""PXCEAE"",$J)","^TMP(""PXCEAEIX"",$J)")
+4 DO DONE^PXCE
+5 QUIT
+6 ;