source:
BMXNET_RPMS_dotNET_UTILITIES-BMX/trunk/m/BMXUTL2.m@
934
Last change on this file since 934 was 931, checked in by , 14 years ago | |
---|---|
File size: 932 bytes |
Rev | Line | |
---|---|---|
[645] | 1 | BMXUTL2 ; IHS/OIT/HMW - UTIL: PATIENT INFO ; |
[931] | 2 | ;;2.2;BMX;;Sep 07, 2010 |
[645] | 3 | ;;Stolen from:* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER * |
4 | ;; UTILITY: PATIENT FUNCTIONS: CONTRAS, INPATIENT, HIDOSE. | |
5 | ; | |
6 | NEXTAPPT(BMXDFN) ;EP | |
7 | ;---> Return patient's next appointment from Scheduling Package. | |
8 | ;---> Parameters: | |
9 | ; 1 - BMXDFN (req) Patient's IEN (BMXDFN). | |
10 | ; | |
11 | Q:'$G(BMXDFN) "" | |
12 | Q:'$D(^DPT(BMXDFN)) "" | |
13 | ; | |
14 | N BMXAPPT,BMXDT,BMXYES | |
15 | S BMXDT=DT+.2400,BMXYES=0 | |
16 | F S BMXDT=$O(^DPT(BMXDFN,"S",BMXDT)) Q:'BMXDT!(BMXYES) D | |
17 | .N BMXDATA,BMXOI,X | |
18 | .S BMXDATA=$G(^DPT(BMXDFN,"S",BMXDT,0)) | |
19 | .Q:BMXDATA="" | |
20 | .; | |
21 | .;---> Quit if appointment is cancelled. | |
22 | .Q:$P(BMXDATA,U,2)["C" | |
23 | .; | |
24 | .S X=0 F S X=$O(^SC(+BMXDATA,"S",BMXDT,1,X)) Q:'X D | |
25 | ..Q:+$G(^SC(+BMXDATA,"S",BMXDT,1,X,0))'=BMXDFN | |
26 | ..S BMXYES=BMXDT_U_+BMXDATA | |
27 | ; | |
28 | Q:'BMXYES "" | |
29 | ; | |
30 | S BMXAPPT=$$FMTE^XLFDT(+BMXYES,"1P")_" with " | |
31 | S BMXAPPT=BMXAPPT_$P($G(^SC($P(BMXYES,U,2),0)),U) | |
32 | Q BMXAPPT |
Note:
See TracBrowser
for help on using the repository browser.