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

BEDDEHRS.m

Go to the documentation of this file.
  1. BEDDEHRS ;VNGT/HS/BEE-BEDD Patient Routing Slip ; 08 Nov 2011 12:00 PM
  1. ;;2.0;BEDD DASHBOARD;;Jun 04, 2014;Build 13
  1. ;
  1. ;Adapted from BEDDEHRRS/CNHS/RPF
  1. ;
  1. ; Input:
  1. ; BEDDDFN (optional) - Patient DFN
  1. ;
  1. Q
  1. ;
  1. EN(BEDDDFN) ;EP - Patient Routing Slip
  1. ;
  1. S BEDDDFN=$G(BEDDDFN,"")
  1. ;
  1. NEW %,AGE,%ZIS,AGPATDFN,AUPNDAYS,AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,DFN,DIC,DOB
  1. NEW POP,REC,RHIFLAG,SEX,SSN,X,Y
  1. ;
  1. ;
  1. ;Select Patient
  1. S:BEDDDFN]"" DFN=BEDDDFN
  1. I BEDDDFN="" D PTLK^AG
  1. Q:'$D(DFN)
  1. ;
  1. ;Select Device
  1. S %ZIS="QA"
  1. D ^%ZIS
  1. I POP N IOP S IOP=ION D ^%ZIS Q
  1. I $G(IO("Q")) D QUE D HOME^%ZIS Q
  1. U IO
  1. D START
  1. D ^%ZISC
  1. D HOME^%ZIS
  1. Q
  1. ;
  1. START ;Display Report
  1. ;
  1. NEW PNAME,PSEX,PDOB,PSITE,PCHRT,RPTDTM,ELIG,LINE,ALINE,I
  1. ;
  1. S PNAME=$$GET1^DIQ(2,DFN_",",.01,"E")
  1. S PSEX=$$GET1^DIQ(2,DFN_",",.02,"E")
  1. S PDOB=$$FMTE^BEDDUTIL($$GET1^DIQ(2,DFN_",",.03,"I"))
  1. S PSITE=$$GET1^DIQ(4,DUZ(2)_",",.01,"E")
  1. S PCHRT=$$GET1^DIQ(9000001.41,DUZ(2)_","_DFN_",",.02,"E")
  1. S RPTDTM=$TR($$XNOW^BEDDUTIL("5FMZ"),"@"," ")
  1. S ELIG=$$GET1^DIQ(9000001,DFN_",",1112,"E")
  1. S $P(LINE,"_",78)="_"
  1. S $P(ALINE,"*",79)="*"
  1. ;
  1. ;Print the Routing Slip
  1. ;
  1. ;Display Header
  1. D HDR
  1. ;
  1. ;Current Visit Section
  1. W !,ALINE
  1. W !,"Other Information / Instructions: ",!
  1. F I=1:1:3 W !,LINE
  1. ;
  1. W !,ALINE
  1. W !,"Departments for Patient to visit today:"
  1. W !,"(Patient: Please check in at any indicated department)"
  1. W !!,?4,"Return to Clinic Today",?35,"___ Yes ___ No " ;; added for modifications
  1. W !!,"***Note to Surgery Patient: You must go to all indicated departments TODAY,"
  1. W !,"or your surgery may be cancelled!"
  1. ;
  1. W !!,"_____ Lab",?26,"_____ Imaging",?53,"_____ Tribal Health Prog."
  1. W !!,"_____ Testing Ctr Imaging",?26,"_____ Pharmacy",?53,"_____ Respiratory Therapy"
  1. W !!,"_____ Cardiology",?26,"_____ Medisaw",?53,"_____ BC Orientation"
  1. W !!,"_____ Admissions",?26,"_____ Behavioral Health",?53,"_____ ___________________"
  1. W !!,"***Note to nurses: For pre-op patient, please complete the following:"
  1. W !,"Surgery Date:",$E(LINE,1,19)
  1. W !!,"Diagnosis:",$E(LINE,1,45)
  1. W ?56,"Surgeon:",$E(LINE,1,14)
  1. W !!,"Procedure:",$E(LINE,1,45)
  1. W ?56,"LOS:",$E(LINE,1,18)
  1. ;
  1. ;Follow-Up Section
  1. W !,ALINE
  1. W !,"Follow-Up"
  1. W !,"Return to Clinic in: _____________ ",?40,"Days",?50,"Weeks",?60,"Months",?70,"PRN"
  1. W !!,"Appointment date/time:",$E(LINE,1,20)
  1. W !,"For: ___ 15 mins ___ 20 mins ___ 30 mins ___ 40 mins ___ 60 mins"
  1. W !!,"With: ",$E(LINE,1,35)
  1. W !!,"Purpose of appt:",$E(LINE,1,62)
  1. W !!,"Other instructions:",$E(LINE,1,59)
  1. W !,LINE
  1. W !!,"Other Appointments Needed: ",$E(LINE,1,45)
  1. ;
  1. ;Bottom Section
  1. W !,ALINE
  1. W !,"PATIENT: ",PNAME
  1. W !,"___ Was seen in clinic today."
  1. W !,"___ Should not work or attend school from _______________ to _______________"
  1. W !,"___ Should be excused from Phys Ed from ________________ to ________________"
  1. W !,"___ ",$E(LINE,1,74)
  1. W !!,"Signature:",$E(LINE,1,44)
  1. W "Date:",$E(LINE,1,19)
  1. ;
  1. END ; KILL VARIABLES
  1. I $E(IOST)'="C" D CLOSE^%ZISH(IO)
  1. Q
  1. ;
  1. HDR ;EP - Display Report Header
  1. ;
  1. NEW ALERT,PRINT,PCOPY,TITLE
  1. ;
  1. ;Handle Screen Printing
  1. ;
  1. U IO
  1. S ALERT="***ALERT - THIS PAPER CONTAINS YOUR ELIGIBILITY***"
  1. S TITLE="PATIENT ROUTING SLIP - PRINTED: "_RPTDTM
  1. S PCOPY="***PATIENT COPY***"
  1. ;
  1. W !,?((80-$L(PSITE))/2),PSITE
  1. W !,?((80-$L(TITLE))/2),TITLE
  1. W !,?((80-$L(ALERT))/2),ALERT
  1. W !!,"PATIENT NAME: ",PNAME
  1. W ?46,"SEX: ",PSEX
  1. W !,?5,"CHART #: ",PCHRT,?46,"DOB: ",PDOB
  1. W !," ELIGIBILITY: ",ELIG
  1. ;
  1. Q
  1. ;
  1. QUE ;Queue Task
  1. NEW ZTRTN,ZTSAVE,ZTDESC
  1. K IO("Q")
  1. S ZTRTN="START^BEDDEHRS",ZTDESC="Patient Routing Slip"
  1. S ZTSAVE("*")=""
  1. K ZTSK D ^%ZTLOAD
  1. I $D(ZTSK)[0 W !!?5,"Report Cancelled!"
  1. E W !!?5,"Task # ",ZTSK," queued.",!
  1. H 3
  1. Q