Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BWPROF1

BWPROF1.m

Go to the documentation of this file.
  1. BWPROF1 ;IHS/ANMC/MWR - DISPLAY PATIENT PROFILE;15-Feb-2003 22:08;PLS
  1. ;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
  1. ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
  1. ;; SETUP AND EDIT CODE FOR DISPLAYING PATIENT PROFILE.
  1. ;; CALLED BY BWPROF.
  1. ;
  1. D DISPLAY Q:BWPOP
  1. D ^BWPROF3
  1. Q
  1. ;
  1. ;
  1. DISPLAY ;EP
  1. ;---> BWCONF=DISPLAY "CONFIDENTIAL PATIENT INFO" BANNER.
  1. ;---> BWTITLE=TITLE AT TOP OF DISPLAY HEADER.
  1. ;---> BWCHAGE=DISPLAY CHART AND AGE IN HEADER.
  1. ;---> BWSUBH=CODE TO EXECUTE FOR SUBHEADER (COLUMN TITLES).
  1. ;---> BWCODE=CODE TO EXECUTE AS 3RD PIECE OF DIR(0) (AFTER DIR READ).
  1. ;---> BWCRT=1 IF OUTPUT IS TO SCREEN (ALLOWS SELECTIONS TO EDIT).
  1. ;---> BWTAB=6 IF OUTPUT IS TO SCREEN, =3 IF OUTPUT IS TO PRINTER.
  1. ;---> BWPRMT(1,Q)=PROMPTS FOR DIR.
  1. ;
  1. U IO
  1. I '$D(BWDFN)!('$D(BWNAME))!('$D(BWCHRT)) D Q
  1. .W !!,"INSUFFICIENT PATIENT INFORMATION.",!!
  1. .D DIRZ^BWUTL3 S BWPOP=1
  1. ;
  1. S BWCONF=1,BWCHAGE=1
  1. S BWTITLE="* * * Patient Profile * * *" D CENTERT^BWUTL5(.BWTITLE)
  1. S BWCODE="Q:'$D(^TMP(""BW"",$J,2,+X)) "
  1. S BWCODE=BWCODE_"D EDIT^BWPROF1 N X D SORT^BWPROF2,COPYGBL^BWPROF"
  1. S BWPRMT1=" Press RETURN to continue or '^'to exit, or"
  1. S BWPRMT=" Select a left column number to edit"
  1. S BWPRMTQ=" To edit a Procedure or Notification, choose "
  1. S BWPRMTQ=BWPRMTQ_"a number from the left-most column."
  1. ;---> IF PROFILE IS BEING ACCESSED BY A USER FROM OUTSIDE OF THE
  1. ;---> PACKAGE (NOT WOMEN'S HEALTH STAFF), THEN OFFER DISPLAY/PRINT
  1. ;---> OF PROCEDURE; DO NOT OFFER EDIT OF PROCEDURE.
  1. D:$G(BWPUSER)
  1. .S BWCODE="D PRINTPCD^BWPROF1"
  1. .S BWPRMT=" Select a left column number to display/print"
  1. .S BWPRMTQ=" To display or print a Procedure in detail, choose "
  1. .S BWPRMTQ=BWPRMTQ_"a number from the left-most column."
  1. S (BWACCP,N,BWPOP,Z)=0
  1. D TOPHEAD^BWUTL7
  1. S BWTAB=$S(BWCRT:6,1:3)
  1. Q
  1. ;
  1. ;
  1. EDIT ;EP
  1. ;---> FROM BROWSE, BWPOP IN TO EDIT A SINGLE PROCEDURE.
  1. ;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
  1. ;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
  1. N (DT,DTIME,DUZ,IOF,M,N,U,X,Z) D SETVARS^BWUTL5
  1. S X=+X,DA=$P(^TMP("BW",$J,2,X),U,10)
  1. S BWNN=X N X D
  1. .I $P(^TMP("BW",$J,2,BWNN),U)=1 D Q
  1. ..D EDIT2^BWPROC1(DA,.BWPOP) Q:BWPOP D FOLLOWUP^BWPROC1(DA)
  1. .I $P(^TMP("BW",$J,2,BWNN),U)=2 D EDIT2^BWNOTIF(DA) Q
  1. .W !!?3,*7,"This is neither a PROCEDURE nor a NOTIFICATION. "
  1. .W "It cannot be edited here."
  1. .D DIRZ^BWUTL3 Q
  1. ;---> BACK UP 5 RECORDS AFTER EDIT.
  1. S N=$S(BWNN<6:1,1:BWNN-5),Z=0 K BWNN
  1. Q
  1. ;
  1. ;
  1. PRINTPCD ;EP
  1. ;---> FROM BROWSE, PRINT THIS PROCEDURE.
  1. ;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
  1. ;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
  1. N (DT,DTIME,DUZ,M,N,U,X,Z) D SETVARS^BWUTL5
  1. S X=+X,DA=$P(^TMP("BW",$J,2,X),U,10)
  1. S BWN=X N X D
  1. .I $P(^TMP("BW",$J,2,BWN),U)=1 D TOP^BWPRPCD(DA) Q
  1. .W !!?3,*7,"This is not a PROCEDURE. "
  1. .D DIRZ^BWUTL3 Q
  1. ;---> BACK UP 5 RECORDS AFTER EDIT.
  1. S N=$S(BWN<6:1,1:BWN-5),Z=0 K BWN
  1. Q
  1. ;
  1. ;
  1. SUBHEAD ;EP
  1. ;---> SUB HEADER FOR BRIEF DISPLAY OF PROCEDURES ONLY.
  1. W !?BWTAB,"DATE",?16,"PROCEDURE",?27,"RESULTS/DIAGNOSIS",?71,"STATUS",!
  1. W ?BWTAB,"--------",?16,"---------",?27,"----------------------------"
  1. W ?71,"------"
  1. Q