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

BWPATP.m

Go to the documentation of this file.
BWPATP ;IHS/ANMC/MWR - WOMEN'S HEALTH PCC LINK;11-Feb-2003 12:43;PLS
 ;;2.0;WOMEN'S HEALTH;**8**;MAY 16, 1996
 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
 ;;  PRINT A PATIENT'S CASE DATA.
 ;
BEGIN ;EP
 ;---> LOOP TO PRINT PATIENTS' CASE DATA.
 ;---> NOT CURRENTLY CALLED BY ANY OPTION.
 D SETVARS^BWUTL5 S BWPOP=0
 F  D  Q:$G(Y)<0
 .D TITLE^BWUTL5("PRINT A PATIENT'S CASE DATA")
 .D PATLKUP^BWUTL8(.Y) Q:Y<0  S BWDFN=+Y
 .D DEVICE
 .I BWPOP S Y=-1 Q
 .D DATA(BWDFN)
 D EXIT
 Q
 ;
PRTCASE(BWDFN) ;EP
 ;---> PRINT CASE DATA ON ONE PATIENT.
 ;---> CALLED FROM ^BWPATE (EDIT PATIENT CASE DATA).
 I '$G(BWDFN) D  D DIRZ^BWUTL3 Q
 .W !?5,"BWDFN not passed.  Please contact your site manager."
 D DEVICE Q:BWPOP
 D DATA(BWDFN)
 Q
 ;
DEVICE ;EP
 ;---> GET DEVICE AND POSSIBLY QUEUE TO TASKMAN.
 S ZTRTN="DEQUEUE^BWPATP"
 F BWSV="DFN" D
 .I $D(@("BW"_BWSV)) S ZTSAVE("BW"_BWSV)=""
 D ZIS^BWUTL2(.BWPOP,1)
 Q
 ;
DEQUEUE ;EP
 ;---> TASKED PRINTOUT OF PATIENT CASE DATA.
 D DATA(BWDFN)
 D EXIT
 Q
 ;
DATA(BWDFN) ;EP
 ;---> SORT PROCEDURE TYPE FILE POINTERS.
 N A,BWNODE,BWTMP,I,J,N
 D PATVARS^BWUTL3(BWDFN)
 ;---> LOOP THROUGH BW PROCEDURE FILE.
 S I=0
 S A=BWNAMAGE
 S BWNODE="Patient Name: "_A_$$S(42-$L(A))_$$PNLAB^BWUTL5(DUZ(2))_BWCHRT
 D NODE
 S A=$$STREET^BWUTL1(BWDFN)
 S BWNODE=$$S(6)_"Street: "_A_$$S(35-$L(A))
 S BWNODE=BWNODE_"Patient Phone: "_$$HPHONE^BWUTL1(BWDFN)
 D NODE
 S A=$$CTYSTZ^BWUTL1(BWDFN)
 S BWNODE=$$S(2)_"Cty/St/Zip: "_A_$$S(39-$L(A))
 S BWNODE=BWNODE_"Unique ID: "_$$CDCID^BWUTL1(BWDFN)
 D NODE S BWNODE=" " D NODE
 S A=$E(BWCMGR,1,28)
 S BWNODE=$$S(10)_"Case Manager: "_A_$$S(29-$L(A))
 S BWNODE=BWNODE_"Inactive Date: "_$$SLDT2^BWUTL5($$INACT^BWUTL1(BWDFN))
 D NODE
 S BWNODE=$$S(8)_"Breast Tx Need: "_BWBNEED
 D NODE
 S BWNODE=$$S(6)_"Cervical Tx Need: "_BWCNEED
 D NODE
 S BWNODE=$$S(11)_"PAP Regimen: "_BWPAPRG
 D NODE S BWNODE=" " D NODE
 S BWNODE=$$S(0)_"Family Hx of Breast CA: "_$$FAMHX^BWUTL1(BWDFN)
 D NODE
 S A=$$EDC^BWUTL1(BWDFN)
 S BWNODE=$$S(3)_"Currently  Pregnant: "_A_$$S(32-$L(A))
 S BWNODE=BWNODE_"DES Daughter: "_$$DES^BWUTL1(BWDFN)
 D NODE
 S A=$$ENRLDT^BWUTL1(BWDFN)
 S BWNODE=$$S(9)_"Date Enrolled: "_A_$$S(29-$L(A))
 S BWNODE=BWNODE_"Referral Source: "_$$REFS^BWUTL1(BWDFN)
 D NODE S BWNODE=" " D NODE
 S J=0
 F  S J=$O(^BWP(BWDFN,2,J)) Q:'J  D
 . S BWNODE=$$RJ^XLFSTR("Race "_J_": ",23)_$$GET1^DIQ(9002086.07,J_","_BWDFN_",",.01)
 . D NODE
 S BWNODE=$$RJ^XLFSTR("Income Eligible: ",23)_$$GET1^DIQ(9002086,BWDFN_",",.29)
 S BWNODE=BWNODE_$$RJ^XLFSTR("Income Eligible Date: ",70-$L(BWNODE))_$$GET1^DIQ(9002086,BWDFN_",",.3)
 D NODE
 S BWNODE=" " D NODE
 S BWNODE=$$S(25)_"----  Text of NOTES  ----"
 D NODE S BWNODE=" " D NODE
 S N=0
 F  S N=$O(^BWP(BWDFN,1,N)) Q:'N  D
 .S BWNODE=^BWP(BWDFN,1,N,0) D NODE
 S BWNODE=" " D NODE
 S BWNODE=$$S(20)_"-----  End of Patient Printout  -----" D NODE
 D DISPLAY
 Q
 ;
NODE ;EP
 ;---> SET NODE.
 S I=I+1,BWTMP("BW",$J,I,0)=BWNODE
 Q
 ;
S(S) ;EP
 ;---> SPACES.
 Q $$S^BWUTL7($G(S))
 ;
DISPLAY ;EP
 U IO
 D TOPHEAD^BWUTL7
 S BWTITLE1="* * *  WOMEN'S HEALTH: PATIENT CASE DATA PRINTOUT  * * *"
 D CENTERT^BWUTL5(.BWTITLE1)
 ;
 S (BWPOP,N,Z)=0
 W:BWCRT @IOF D HEADER
 F  S N=$O(BWTMP("BW",$J,N)) Q:'N!(BWPOP)  D
 .I $Y+8>IOSL D:BWCRT DIRZ^BWUTL3 Q:BWPOP  D HEADER
 .W !,BWTMP("BW",$J,N,0)
 I BWCRT&('BWPOP) W !! D DIRZ^BWUTL3
 W:'BWCRT @IOF
 D ^%ZISC
 K BWTMP("BW",$J)
 Q
 ;
 W:BWPAGE>1!BWCRT @IOF,!
 W BWCONFF W:'BWCRT !,BWTIMLN
 W !!,BWTITLE1,?70,"page: ",BWPAGE,!,BWLINE S BWPAGE=BWPAGE+1
 ;W !!,"Patient Name: ",BWNAMAGE,?53,$$PNLAB^BWUTL5(DUZ(2)),BWCHRT
 Q
 ;
EXIT ;EP
 D KILLALL^BWUTL8
 Q