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

DVBAUTL5.m

Go to the documentation of this file.
  1. DVBAUTL5 ;ALB/JLU;UTILITY ROUTINE;9/13/94
  1. ;;2.7;AMIE;;Apr 10, 1995
  1. ;
  1. SELECT(PAR1,PAR2) ;
  1. ;This function call will ask the user whether they want to select
  1. ;by date range or name/ssn. It will return a "D" for date range,
  1. ;"N" for name/ssn or a zero otherwise. It will accept two inputs
  1. ;PAR1 is the title oposite the name /ssn example Date Range
  1. ;PAR2 is the option using this call exampl 21 day certificate
  1. ;
  1. S DIR(0)="SOM^N:Patient Name/SSN;D:"_PAR1
  1. S DIR("B")="N",DIR("A")="Select "_PAR2_" by"
  1. D ^DIR
  1. I $D(DTOUT)!($D(DUOUT))!($D(DIRUT))!($D(DIROUT)) D SK Q 0
  1. D SK
  1. Q Y
  1. ;
  1. SK ;
  1. K DIR,DTOUT,DUOUT,DIRUT,DIROUT
  1. Q
  1. ;
  1. PAT(WHO) ;this entry point allows a patient lookup.
  1. ;the parameter WHO represents either MAS, RO OR NOONE
  1. ;
  1. S DIC="^DVB(396,",DIC(0)="AEMQZ"
  1. I $D(WHO) DO
  1. .I WHO="RO" S DIC("S")="I $D(^(4)),$P(^(4),U,4)]"""",$D(^(2)),$P(^(2),U,10)'=""L"",$D(^DPT($P(^(0),U,1),0))"
  1. .I WHO="MAS" S DIC("S")="I $P(^(0),U,14)]"""",$D(^(4)),$D(^(2)),$P(^(2),U,10)'=""L"",$D(^DPT($P(^(0),U,1),0))"
  1. .I WHO="MAS"!(WHO="RO") S DIC("W")="W ?32,""Original processing date "" N Y S Y=$S(WHO=""RO"":$P(^(4),U,4),1:$P(^(0),U,14)) D DD^%DT W Y"
  1. .I WHO=7131 S DIC("W")="I $D(^(1)) N Y S Y=$P(^(1),U) D DD^%DT W "" on "",Y S Y=$G(^(2)) I Y]"""" W "" "",$S($P(Y,U,10)=""A"":""Adm."",1:""Act.""),"" Req. by "",$P(Y,U,8)"
  1. .Q
  1. D ^DIC
  1. K DIC
  1. Q $P(Y,U,1)