source: WorldVistAEHR/trunk/r/AUTOMATED_MED_INFO_EXCHANGE-DVBA-DVBC/DVBCENQ2.m@ 701

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1DVBCENQ2 ;ALB ISC/THM-DISPLAY C&P APPOINTMENTS ; 8/13/90 7:02 AM
2 ;;2.7;AMIE;**17**;Apr 10, 1995
3 ;
4 S DVBCLNE=" >>> Future C&P Appointments <<<" W ! D HDR
5 ;
6FA S CT=0 W ! I $O(^DPT(DFN,"S",DT-.1))="" W !!?23,"No future C & P appointments found.",!! G EXIT
7 K PRT F FA=DT-.1:0 S FA=$O(^DPT(DFN,"S",FA)) Q:FA="" S L=^(FA,0),C=+L S YY=$P(L,U,2) I YY'="N"&(YY'="C")&(YY'="NA")&(YY'="CA")&(YY'="PC")&(YY'="PCA") D FA1
8 W:'$D(PRT) !!?23,"No future C&P appointments found.",!! G EXIT
9 ;
10FA1 S DVBCX=$P(^DPT(DFN,"S",FA,0),U,16) I $D(^SD(409.1,+DVBCX,0)) Q:$P(^(0),U,1)'["COMPENSATION" ;compensation and pension exams only
11 W !?0,$$FMTE^XLFDT(FA,"5DZ"),?9,$J(+$E(FA_"00",9,10)_":"_$E(FA_"0000",11,12),6),?18,$E($P($S($D(^SC(C,0)):^(0),1:""),"^"),1,21)," " D CAL S PRT=1
12 Q
13 ;
14EXIT K YY,CT,FA,L,C,DVBCX,DATE,DVBCLNE W !!! Q
15 ;
16CONT I IOST?1"C-".E W !!,"Press [RETURN] to continue " R ANS:DTIME
17 Q
18 ;
19HDR W ?(80-$L(DVBCLNE)\2),DVBCLNE,!!?0,"Date",?12,"Time",?18,"Clinic",?43," Lab",?56," X-Ray",?69," EKG",!?0 F I=0:1:79 W "-"
20 Q
21 ;
22CAL F J=3:1:5 I $P(L,U,J)]"" S DATE(J)=$E($P(L,U,J),4,7),DATE(J)=$E(DATE(J),1,2)_"/"_$E(DATE(J),3,4)_" ",TIME(J)=$P($P(L,U,J),".",2) D CAL1
23 Q
24 ;
25CAL1 S:TIME(J)=1 TIME(J)=10 S TIME(J)=$S($L(TIME(J))=2:TIME(J)_"00",$L(TIME(J))=3:TIME(J)_"0",1:TIME(J)),DATE(J)=DATE(J)_TIME(J)
26 I $D(DATE(3)) S DATE(3)=$E(DATE(3),1,6)_$E(DATE(3),7,8)_":"_$E(DATE(3),9,10) W:$D(DATE(3)) ?42,DATE(3)
27 I $D(DATE(4)) S DATE(4)=$E(DATE(4),1,6)_$E(DATE(4),7,8)_":"_$E(DATE(4),9,10) W:$D(DATE(4)) ?55,DATE(4)
28 I $D(DATE(5)) S DATE(5)=$E(DATE(5),1,6)_$E(DATE(5),7,8)_":"_$E(DATE(5),9,10) W:$D(DATE(5)) ?68,DATE(5)
29 I IOST?1"C-".E,$Y>18 D CONT,HDR
30 I IOST?1"P-".E,$Y>45 D HDR
31 K DATE,CONT
32 Q
Note: See TracBrowser for help on using the repository browser.