source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDCI.m@ 1710

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

initial load of WorldVistAEHR

File size: 782 bytes
RevLine 
[613]1SDCI ;SF/GFT,MAN/GRR - CHECK-IN/UNSCHEDULED APPOINTMENT ; 20 SEP 84 8:20 am
2 ;;5.3;Scheduling;;Aug 13, 1993
3 ;
4PT ;
5 N DFN,SDT,SC,SDT,SDDQ,SDD
6 W !! S DIC="^DPT(",DIC(0)="AEQMZ" D ^DIC K DIC G PTQ:Y<0
7 S DFN=+Y,SDT=DT,SDD=0
8 F S SDT=$O(^DPT(DFN,"S",SDT)) Q:$P(SDT,".")-DT S X=$G(^(SDT,0)) I $P(X,U,2)'["C",$P(X,U,2)'["N"!($P(X,U,2)="NT") S SC=+X D
9 .S SDDA=0 F S SDDA=+$O(^SC(SC,"S",SDT,1,SDDA)) Q:'$D(^(SDDA,0)) I DFN=+^(0) D Q
10 ..W !!,"Appointment at "_$E(SDT_"000",9,12)_" on ",$$FDATE^VALM1(SDT)," in "_$P(^SC(SC,0),U)
11 ..D ONE^SDAM2(DFN,SC,SDT,SDDA,1,"") S SDD=SDD+1
12 ;
13 W:'SDD *7,!,"This patient has no appointments scheduled today."
14 W ! S DIR("A")="Do you want to add a new 'unscheduled' appointment'",DIR(0)="Y"
15 D ^DIR K DIR G PTQ:Y'=1
16 S SDY=$$CL^SDAMWI(DFN)
17PTQ Q
Note: See TracBrowser for help on using the repository browser.