WVPROF1 ;HCIOFO/FT,JR IHS/ANMC/MWR - DISPLAY PATIENT PROFILE; ;7/30/98 11:39
;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
;; SETUP AND EDIT CODE FOR DISPLAYING PATIENT PROFILE.
;; CALLED BY WVPROF.
;
D DISPLAY Q:WVPOP
D ^WVPROF3
Q
;
;
DISPLAY ;EP
;---> WVCONF=DISPLAY "CONFIDENTIAL PATIENT INFO" BANNER.
;---> WVTITLE=TITLE AT TOP OF DISPLAY HEADER.
;---> WVCHAGE=DISPLAY CHART AND AGE IN HEADER.
;---> WVSUBH=CODE TO EXECUTE FOR SUBHEADER (COLUMN TITLES).
;---> WVCODE=CODE TO EXECUTE AS 3RD PIECE OF DIR(0) (AFTER DIR READ).
;---> WVCRT=1 IF OUTPUT IS TO SCREEN (ALLOWS SELECTIONS TO EDIT).
;---> WVTAB=6 IF OUTPUT IS TO SCREEN, =3 IF OUTPUT IS TO PRINTER.
;---> WVPRMT(1,Q)=PROMPTS FOR DIR.
;
U IO
I '$D(WVDFN)!('$D(WVNAME))!('$D(WVCHRT)) D Q
.W !!,"INSUFFICIENT PATIENT INFORMATION.",!!
.D DIRZ^WVUTL3 S WVPOP=1
;
S WVCONF=1,WVCHAGE=1
S WVTITLE="* * * Patient Profile * * *" D CENTERT^WVUTL5(.WVTITLE)
S WVCODE="Q:'$D(^TMP(""WV"",$J,2,+X)) "
S WVCODE=WVCODE_"D EDIT^WVPROF1 N X D SORT^WVPROF2,COPYGBL^WVPROF"
;---> IF PROFILE IS BEING ACCESSED BY A USER FROM OUTSIDE OF THE
;---> PACKAGE (NOT WOMEN'S HEALTH STAFF), THEN OFFER DISPLAY/PRINT
;---> OF PROCEDURE; DO NOT OFFER EDIT OF PROCEDURE.
D:$G(WVPUSER)
.S WVCODE="D PRINTPCD^WVPROF1"
S (WVACCP,N,WVPOP,Z)=0
D TOPHEAD^WVUTL7
S WVTAB=$S(WVCRT:6,1:3)
Q
;
;
EDIT ;EP
;---> FROM BROWSE, WVPOP IN TO EDIT A SINGLE PROCEDURE.
;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
D SETVARS^WVUTL5
S X=+X,DA=$P(^TMP("WV",$J,2,X),U,10)
S WVNN=X N X D
.I $P(^TMP("WV",$J,2,WVNN),U)=1 D Q
..D EDIT2^WVPROC1(DA,.WVPOP) Q:WVPOP
.I $P(^TMP("WV",$J,2,WVNN),U)=2 D EDIT2^WVNOTIF(DA) Q
.W !!?3,*7,"This is neither a PROCEDURE nor a NOTIFICATION. "
.W "It cannot be edited here."
.D DIRZ^WVUTL3 Q
;---> BACK UP 5 RECORDS AFTER EDIT.
S N=$S(WVNN<6:1,1:WVNN-5),Z=0 K WVNN
Q
;
;
PRINTPCD ;EP
;---> FROM BROWSE, PRINT THIS PROCEDURE.
;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
D SETVARS^WVUTL5
S X=+X,DA=$P(^TMP("WV",$J,2,X),U,10)
S WVN=X N X D
.I $P(^TMP("WV",$J,2,WVN),U)=1 D TOP^WVPRPCD(DA) Q
.W !!?3,*7,"This is not a PROCEDURE. "
.D DIRZ^WVUTL3 Q
;---> BACK UP 5 RECORDS AFTER EDIT.
S N=$S(WVN<6:1,1:WVN-5),Z=0 K WVN
Q
;
;
SUBHEAD ;EP
;---> SUB HEADER FOR BRIEF DISPLAY OF PROCEDURES ONLY.
W !?WVTAB,"DATE",?16,"PROCEDURE",?27,"RESULTS/DIAGNOSIS",?71,"STATUS",!
W ?WVTAB,"--------",?16,"---------",?27,"----------------------------"
W ?71,"------"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HWVPROF1 2771 printed Oct 16, 2024@18:47:56 Page 2
WVPROF1 ;HCIOFO/FT,JR IHS/ANMC/MWR - DISPLAY PATIENT PROFILE; ;7/30/98 11:39
+1 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
+2 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
+3 ;; SETUP AND EDIT CODE FOR DISPLAYING PATIENT PROFILE.
+4 ;; CALLED BY WVPROF.
+5 ;
+6 DO DISPLAY
if WVPOP
QUIT
+7 DO ^WVPROF3
+8 QUIT
+9 ;
+10 ;
DISPLAY ;EP
+1 ;---> WVCONF=DISPLAY "CONFIDENTIAL PATIENT INFO" BANNER.
+2 ;---> WVTITLE=TITLE AT TOP OF DISPLAY HEADER.
+3 ;---> WVCHAGE=DISPLAY CHART AND AGE IN HEADER.
+4 ;---> WVSUBH=CODE TO EXECUTE FOR SUBHEADER (COLUMN TITLES).
+5 ;---> WVCODE=CODE TO EXECUTE AS 3RD PIECE OF DIR(0) (AFTER DIR READ).
+6 ;---> WVCRT=1 IF OUTPUT IS TO SCREEN (ALLOWS SELECTIONS TO EDIT).
+7 ;---> WVTAB=6 IF OUTPUT IS TO SCREEN, =3 IF OUTPUT IS TO PRINTER.
+8 ;---> WVPRMT(1,Q)=PROMPTS FOR DIR.
+9 ;
+10 USE IO
+11 IF '$DATA(WVDFN)!('$DATA(WVNAME))!('$DATA(WVCHRT))
Begin DoDot:1
+12 WRITE !!,"INSUFFICIENT PATIENT INFORMATION.",!!
+13 DO DIRZ^WVUTL3
SET WVPOP=1
End DoDot:1
QUIT
+14 ;
+15 SET WVCONF=1
SET WVCHAGE=1
+16 SET WVTITLE="* * * Patient Profile * * *"
DO CENTERT^WVUTL5(.WVTITLE)
+17 SET WVCODE="Q:'$D(^TMP(""WV"",$J,2,+X)) "
+18 SET WVCODE=WVCODE_"D EDIT^WVPROF1 N X D SORT^WVPROF2,COPYGBL^WVPROF"
+19 ;---> IF PROFILE IS BEING ACCESSED BY A USER FROM OUTSIDE OF THE
+20 ;---> PACKAGE (NOT WOMEN'S HEALTH STAFF), THEN OFFER DISPLAY/PRINT
+21 ;---> OF PROCEDURE; DO NOT OFFER EDIT OF PROCEDURE.
+22 if $GET(WVPUSER)
Begin DoDot:1
+23 SET WVCODE="D PRINTPCD^WVPROF1"
End DoDot:1
+24 SET (WVACCP,N,WVPOP,Z)=0
+25 DO TOPHEAD^WVUTL7
+26 SET WVTAB=$SELECT(WVCRT:6,1:3)
+27 QUIT
+28 ;
+29 ;
EDIT ;EP
+1 ;---> FROM BROWSE, WVPOP IN TO EDIT A SINGLE PROCEDURE.
+2 ;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
+3 ;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
+4 DO SETVARS^WVUTL5
+5 SET X=+X
SET DA=$PIECE(^TMP("WV",$JOB,2,X),U,10)
+6 SET WVNN=X
NEW X
Begin DoDot:1
+7 IF $PIECE(^TMP("WV",$JOB,2,WVNN),U)=1
Begin DoDot:2
+8 DO EDIT2^WVPROC1(DA,.WVPOP)
if WVPOP
QUIT
End DoDot:2
QUIT
+9 IF $PIECE(^TMP("WV",$JOB,2,WVNN),U)=2
DO EDIT2^WVNOTIF(DA)
QUIT
+10 WRITE !!?3,*7,"This is neither a PROCEDURE nor a NOTIFICATION. "
+11 WRITE "It cannot be edited here."
+12 DO DIRZ^WVUTL3
QUIT
End DoDot:1
+13 ;---> BACK UP 5 RECORDS AFTER EDIT.
+14 SET N=$SELECT(WVNN<6:1,1:WVNN-5)
SET Z=0
KILL WVNN
+15 QUIT
+16 ;
+17 ;
PRINTPCD ;EP
+1 ;---> FROM BROWSE, PRINT THIS PROCEDURE.
+2 ;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
+3 ;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
+4 DO SETVARS^WVUTL5
+5 SET X=+X
SET DA=$PIECE(^TMP("WV",$JOB,2,X),U,10)
+6 SET WVN=X
NEW X
Begin DoDot:1
+7 IF $PIECE(^TMP("WV",$JOB,2,WVN),U)=1
DO TOP^WVPRPCD(DA)
QUIT
+8 WRITE !!?3,*7,"This is not a PROCEDURE. "
+9 DO DIRZ^WVUTL3
QUIT
End DoDot:1
+10 ;---> BACK UP 5 RECORDS AFTER EDIT.
+11 SET N=$SELECT(WVN<6:1,1:WVN-5)
SET Z=0
KILL WVN
+12 QUIT
+13 ;
+14 ;
SUBHEAD ;EP
+1 ;---> SUB HEADER FOR BRIEF DISPLAY OF PROCEDURES ONLY.
+2 WRITE !?WVTAB,"DATE",?16,"PROCEDURE",?27,"RESULTS/DIAGNOSIS",?71,"STATUS",!
+3 WRITE ?WVTAB,"--------",?16,"---------",?27,"----------------------------"
+4 WRITE ?71,"------"
+5 QUIT