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;**172**;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"
; next 3 lines added per PX*1.0*172
N PXPTSSN,PXREC,PXDUZ S PXDUZ=DUZ,PXPTSSN=$TR($G(PXCEPAT("SSN")),"-")
D SEC(.PXREC,PXDUZ,PXPTSSN)
I PXREC W !!,"Security regulations prohibit computer access to your own medical record." H 3 G QUIT
D EN^VALM("PXCE ENCOUNTER PROFILE")
QUIT ;
D MAKELIST^PXCENEW,DONE^PXCE
Q
;
SEC(PXREC,PXDUZ,PXPTSSN) ; added per PX*1.0*172
N PXNPSSN S PXREC=0
S PXNPSSN=$$GET1^DIQ(200,PXDUZ_",",9,"I","","PXNPERR")
I PXNPSSN=PXPTSSN S PXREC=1
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
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXCEEXP 2411 printed Oct 16, 2024@18:28:42 Page 2
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;**172**;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 ; next 3 lines added per PX*1.0*172
+11 NEW PXPTSSN,PXREC,PXDUZ
SET PXDUZ=DUZ
SET PXPTSSN=$TRANSLATE($GET(PXCEPAT("SSN")),"-")
+12 DO SEC(.PXREC,PXDUZ,PXPTSSN)
+13 IF PXREC
WRITE !!,"Security regulations prohibit computer access to your own medical record."
HANG 3
GOTO QUIT
+14 DO EN^VALM("PXCE ENCOUNTER PROFILE")
QUIT ;
+1 DO MAKELIST^PXCENEW
DO DONE^PXCE
+2 QUIT
+3 ;
SEC(PXREC,PXDUZ,PXPTSSN) ; added per PX*1.0*172
+1 NEW PXNPSSN
SET PXREC=0
+2 SET PXNPSSN=$$GET1^DIQ(200,PXDUZ_",",9,"I","","PXNPERR")
+3 IF PXNPSSN=PXPTSSN
SET PXREC=1
+4 QUIT
+5 ;
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 ;