source: FOIAVistA/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBAUTL5.m@ 1094

Last change on this file since 1094 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1DVBAUTL5 ;ALB/JLU;UTILITY ROUTINE;9/13/94
2 ;;2.7;AMIE;;Apr 10, 1995
3 ;
4SELECT(PAR1,PAR2) ;
5 ;This function call will ask the user whether they want to select
6 ;by date range or name/ssn. It will return a "D" for date range,
7 ;"N" for name/ssn or a zero otherwise. It will accept two inputs
8 ;PAR1 is the title oposite the name /ssn example Date Range
9 ;PAR2 is the option using this call exampl 21 day certificate
10 ;
11 S DIR(0)="SOM^N:Patient Name/SSN;D:"_PAR1
12 S DIR("B")="N",DIR("A")="Select "_PAR2_" by"
13 D ^DIR
14 I $D(DTOUT)!($D(DUOUT))!($D(DIRUT))!($D(DIROUT)) D SK Q 0
15 D SK
16 Q Y
17 ;
18SK ;
19 K DIR,DTOUT,DUOUT,DIRUT,DIROUT
20 Q
21 ;
22PAT(WHO) ;this entry point allows a patient lookup.
23 ;the parameter WHO represents either MAS, RO OR NOONE
24 ;
25 S DIC="^DVB(396,",DIC(0)="AEMQZ"
26 I $D(WHO) DO
27 .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))"
28 .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))"
29 .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"
30 .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)"
31 .Q
32 D ^DIC
33 K DIC
34 Q $P(Y,U,1)
Note: See TracBrowser for help on using the repository browser.