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

BSDAMEPW.m

Go to the documentation of this file.
BSDAMEPW ; IHS/ANMC/LJF - Extended Display for Wait List Appointments; 
 ;;5.3;PIMS;**1012**;APR 26, 2002
 ;
EN(SDWE) ;EP; Selection of appointment
 ; requires DFN
 K ^TMP("SDAMEPW",$J)
 S VALMBCK=""
 N SDWIDTH,SDPT,SDSC,SDIENSA,SDIENSB
 S SDIENSA=$P(SDWE,",",2)
 S SDIENSB=$P(SDWE,",")
 S SDCL=$$GET1^DIQ(9009017.1,SDIENSA,.01,"I")
 W ! D WAIT^DICD,EN^VALM("BSDAM WAIT LIST PROFILE")
 S VALMBCK="R"
ENQ Q
 ;
HDR ; Header
 N VA,VAERR
 S VALMHDR(1)=$S($$GET1^DIQ(44,SDCL,3.5)]"":$$GET1^DIQ(44,SDCL,3.5),$$GET1^DIQ(44,SDCL,3)]"":$$GET1^DIQ(44,SDCL,3),1:"")_$$SP^BDGF(5)_$$CONF^BDGF  ;cmi/maw 5/14/2010 PATCH 1012 RQMT148 mod line
 D PID^VADPT
 S VALMHDR(2)=$E($P("Patient: "_$G(^DPT(DFN,0)),"^",1),1,30)_" ("_VA("BID")_")"_" Phone: "_$$GET1^DIQ(2,DFN,.131)
 I $$DEAD^BDGF2(DFN) S X=$G(IORVON)_"Died on "_$$DOD^BDGF2(DFN)_$G(IORVOFF),VALMHDR(2)=$$SETSTR^VALM1(X,VALMHDR(2),40,60)
 S X=$S($D(^DPT(DFN,.1)):"Ward: "_^(.1),1:"Outpatient")
 S VALMHDR(2)=$$SETSTR^VALM1(X,VALMHDR(2),81-$L(X),$L(X))
 S X="Clinic: "_$P(^SC(SDCL,0),U)
 Q
 ;
INIT ;
 N VA,VAERR,SDFSTCOL,SDSECCOL,CTRLCOL
 D PID^VADPT
 S SDFSTCOL=18,SDWIDTH=16,SDSECCOL=57
 D VARS
 D WLDATA ;        Appointment Data
 S VALMCNT=SDLN
 Q
 ;
VARS ;-- get vars for the expanded profile
 S SDPRI=$$GET1^DIQ(9009017.11,SDWE,.02)
 S SDADD=$$GET1^DIQ(9009017.11,SDWE,.03)
 S SDUSERA=$$GET1^DIQ(9009017.11,SDWE,.04)
 S SDREC=$$GET1^DIQ(9009017.11,SDWE,.05)
 S SDREM=$$GET1^DIQ(9009017.11,SDWE,.07)
 S SDUSERR=$$GET1^DIQ(9009017.11,SDWE,.11)
 S SDREA=$$GET1^DIQ(9009017.11,SDWE,.09)
 S SDPRV=$$GET1^DIQ(9009017.11,SDWE,.06)
 S SDRES=$$GET1^DIQ(9009017.11,SDWE,.08)
 Q
 ;
WLDATA ; Appointment Data
 ;
 D SET($$SETSTR^VALM1("*** Wait List Demographics ***","",24,32))
 D CNTRL^VALM10(SDLN,24,32,IOINHI,IOINORM)
 D SET("")
 ;
 S X=""
 S X=$$SETSTR^VALM1("           Name:",X,1,SDWIDTH)
 S X=$$SETSTR^VALM1($P($G(^DPT(DFN,0)),U),X,SDFSTCOL,24)
 S X=$$SETSTR^VALM1("         Clinic:",X,40,SDWIDTH)
 S X=$$SETSTR^VALM1($P($G(^SC(SDCL,0)),U),X,SDSECCOL,24)
 D SET(X)
 ;
 S X=""
 S X=$$SETSTR^VALM1("       Priority:",X,1,SDWIDTH)
 S X=$$SETSTR^VALM1(SDPRI,X,SDFSTCOL,24)
 S X=$$SETSTR^VALM1("   Reason Added:",X,40,SDWIDTH)
 S X=$$SETSTR^VALM1(SDREA,X,SDSECCOL,24)
 D SET(X)
 ;
 S X=""
 S X=$$SETSTR^VALM1("     Date Added:",X,1,SDWIDTH)
 S X=$$SETSTR^VALM1(SDADD,X,SDFSTCOL,24)
 S X=$$SETSTR^VALM1(" User Who Added:",X,40,SDWIDTH)
 S X=$$SETSTR^VALM1(SDUSERA,X,SDSECCOL,50)
 D SET(X)
 ;
 S X=""
 S X=$$SETSTR^VALM1("       Provider:",X,1,SDWIDTH)
 S X=$$SETSTR^VALM1(SDPRV,X,SDFSTCOL,24)
 S X=$$SETSTR^VALM1("    Recall Date:",X,40,SDWIDTH)
 S X=$$SETSTR^VALM1(SDREC,X,SDSECCOL,50)
 D SET(X)
 ;
 S X=""
 S X=$$SETSTR^VALM1("   Date Removed:",X,1,SDWIDTH)
 S X=$$SETSTR^VALM1(SDREM,X,SDFSTCOL,24)
 S X=$$SETSTR^VALM1("User Who Remove:",X,40,SDWIDTH)
 S X=$$SETSTR^VALM1(SDUSERR,X,SDSECCOL,50)
 D SET(X)
 ;
 S X=""
 S X=$$SETSTR^VALM1("     Resolution:",X,1,SDWIDTH)
 S X=$$SETSTR^VALM1(SDRES,X,SDFSTCOL,24)
 D SET(X)
 ;
 S X=""
 S X=$$SETSTR^VALM1("       Comments:",X,1,SDWIDTH)
 D SET(X)
 N BSDA,BSDCMT,BSDCMTC
 S BSDCMTC=0,BSDCMT=""
 S BSDA=0 F  S BSDA=$O(^BSDWL(SDIENSA,1,SDIENSB,1,BSDA)) Q:'BSDA  D
 . S BSDCMTC=BSDCMTC+1
 . S BSDCMT=BSDCMT_$G(^BSDWL(SDIENSA,1,SDIENSB,1,BSDA,0))
 D WRAP^BDGF(BSDCMT,60,.BSDCMT)
 I $D(BSDCMT(1)) D
 . S X="",X=$$SETSTR^VALM1(BSDCMT(1),X,SDFSTCOL,60) D SET(X)   ;first line as before
 . F I=2:1 Q:'$D(BSDCMT(I))  S X=$$REPEAT^XLFSTR(" ",SDWIDTH),X=$$SETSTR^VALM1(BSDCMT(I),X,SDFSTCOL,60) D SET(X)
 ;
 D SET(""),SET("")
 Q
 ;
SET(X) ; Set in ^TMP global for display
 S SDLN=SDLN+1,^TMP("SDAMEPW",$J,SDLN,0)=X
 Q
 ;
EXIT ;EP;
 K ^TMP("SDAMEPW",$J)
 K VALMCNT,SDT,SDCL,SDDA,SDLN,DFN,SDW,SDOE,SDPOV,SDPV
 K SDPRI,SDADD,SDUSERA,SDREM,SDUSERR,SDREA,SDPRV,SDRES,SDCMT
 Q
 ;
VISIT ; -- set up IHS visit display lines
 ; Appointment Check Out Data
 ;
 D SET^SDAMEP1($$SETSTR^VALM1("*** Check Out ***","",24,17))
 D CNTRL^VALM10(SDLN,24,17,IOINHI,IOINORM)
 D SET^SDAMEP1("")
 ;
 I '$$CODT^SDCOU(DFN,SDT,SDCL) D  G APCOQ
 .D SET^SDAMEP1($$SETSTR^VALM1("No check out information.","",2,25))
 D EN^SDCO0("SDAMEP",SDOE,SDLN,.SDLN)
APCOQ Q