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

VSITASK.m

Go to the documentation of this file.
  1. VSITASK ;ISD/RJP - Prompt User ;6/20/96
  1. ;;1.0;PCE PATIENT CARE ENCOUNTER;**76**;Aug 12, 1996
  1. ; Patch PX*1*76 changes the 2nd line of all VSIT* routines to reflect
  1. ; the incorporation of the module into PCE. For historical reference,
  1. ; the old (VISIT TRACKING) 2nd line is included below to reference VSIT
  1. ; patches.
  1. ;
  1. ;;2.0;VISIT TRACKING;;Aug 12, 1996;
  1. ;
  1. VSIT(DFN,LST) ; - prompt user to select visit
  1. ; - called by VSIT
  1. ;
  1. ; - pass DFN = <patient record number>
  1. ; LST = <passed by reference, array of matching visits VSITGET>
  1. ; - rtns = <visit record # selected>
  1. ;
  1. N X,Y,NOD,VSITI,X1,X2,DIR
  1. D:$D(DFN)&$D(LST)
  1. . S X="Visits for "_$P(^DPT(DFN,0),"^")
  1. . S Y="",$P(Y,"-",$L(X)+1)="" W !,X,!,Y,!
  1. . F VSITI=1:1:LST S NOD=$G(LST(VSITI)) Q:NOD="" D
  1. . . D FMT(+$P(NOD,"|"))
  1. . . W $J(VSITI,2)_" - ",?5,X1,!,?5,X2,!
  1. . S DIR(0)="NA^1:"_LST
  1. . S DIR("A")="Select Visit (1-"_LST_"): "
  1. . S DIR("B")="1" D ^DIR
  1. Q $G(Y)
  1. ;
  1. FMT(IEN) ; - format display lines for a visit
  1. ;
  1. ; - pass IEN = <visit record #>
  1. ; - rtns X1,X2 = <formatted display lines>
  1. ;
  1. N VSITI,VSIT,X,Y
  1. S IEN=$G(IEN),(X1,X2)=""
  1. D SLC^VSITVAR(IEN,"VDT^SVC^INS^TYP^ELG^LOC^DSS","E")
  1. S X=$P(VSIT("VDT"),"^",2),X1=X_$E($J("",80),$L(X)+1,27)
  1. S X=$E($P(VSIT("SVC"),"^",2),1,18),X1=X1_X_" "
  1. S X=$E($P(VSIT("INS"),"^",2),1,18),X1=X1_X_" "
  1. S X=$E($P($P(VSIT("TYP"),"^",2)," "),1,8),X1=X1_"("_X_")"
  1. S X=$S($P(VSIT("ELG"),"^",2)]"":" Elig: ",1:"")_$E($P(VSIT("ELG"),"^",2),1,13),X2=X2_X_$E($J("",80),$L(X)+1,22)
  1. S X="Loc: "_$E($P(VSIT("LOC"),"^",2),1,18),X2=X2_X_$E($J("",80),$L(X)+1,20)
  1. S X="Cat: "_$E($P(VSIT("DSS"),"^",2),1,18),X2=X2_X_$E($J("",80),$L(X)+1,20)
  1. Q
  1. ;
  1. ELG(PAT) ; - prompt user to select pt. eligibility
  1. ; - called by VSITCK1
  1. ;
  1. ; - pass PAT = <patient record number>
  1. ; rtns = <selected eligibility>
  1. ;
  1. N X,Y,DIC,D,DZ S PAT=$$GET^VSITVAR("PAT",PAT,"B")
  1. S X="Eligibilities for "_$P(PAT,"^",2)
  1. S Y="",$P(Y,"-",$L(X)+1)="" W !,X,!,Y
  1. S DIC(0)="AEQMZ",DIC="^DIC(8,"
  1. S DIC("S")="I $D(^DPT(+PAT,""E"",+Y,0))"
  1. I $G(^DPT(+PAT,.36)) S DIC("B")=$P(^DIC(8,+^(.36),0),"^")
  1. S DIC("A")="Select Eligibility for this Visit: "
  1. S D="B",DZ="??" D DQ^DICQ K D,DZ F D ^DIC Q:Y>0 W " Required!"
  1. Q $P(Y,"^")