Changeset 1096
- Timestamp:
- Feb 27, 2011, 6:31:10 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/m/BSDX04.m
r1085 r1096 1 BSDX04 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 7/15/10 12:44pm1 BSDX04 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ; ; 2/27/11 6:32am 2 2 ;;1.5;BSDX;;Jan 25, 2011 3 ; Change Log: 4 ; July 11 2010: Pass BSDXSTART and END as FM dates rather than US formatted dates 5 ; for i18n 3 ; Change Log: 4 ; July 11 2010: Pass BSDXSTART and END as FM dates rather than US formatted dates 5 ; for i18n 6 ; Feb 27 2010 (v. 1.5) SMH 7 ; - Grab multiple resources instead of a single resource. 8 ; --> Will be passed from C# as | delimited. 9 ; - Change in algorithm. Padding part to pad start and end dates to coincide 10 ; --> with schedule now not performed. C# won't need that anymore. 6 11 ; 7 12 ; … … 20 25 Q 21 26 ; 22 CASSCH(BSDXY,BSDXRES,BSDXSTART,BSDXEND,BSDXTYPES,BSDXSRCH) ;EP 23 ;Called by BSDX CREATE ASGND SLOT SCHED 24 ;Create Assigned Slot Schedule recordset 27 CASSCH(BSDXY,BSDXRES,BSDXSTART,BSDXEND,BSDXTYPES,BSDXSRCH) ;EP -- RPC: BSDX CREATE ASGND SLOT SCHED 28 ;Create Assigned Slot Schedule recordset (Access Blocks, Availabilities, etc.) 25 29 ;This call is used both to create a schedule of availability for the calendar display 26 30 ;and to search for availability in the Find Appointment function 27 31 ; 28 ;BSDXRES is resource name 29 ; 30 ;//smh 31 ; BSDXSTART and BSDXEND both passed in FM Format. 32 ; BSDXSTART is the Date Portion of FM Date 33 ; BSDXEND -- pass date and h,m,s as well 34 ;//smh 32 ;BSDXRES is resources name, delimited by | 33 ; 34 ; BSDXSTART and BSDXEND both passed in FM Format. 35 ; BSDXSTART is the Date Portion of FM Date 36 ; BSDXEND -- pass date and h,m,s as well 35 37 ; 36 38 ;BSDXTYPES is |-delimited list of Access Type Names … … 48 50 ;S ^HW("BSDX04")=BSDXRES_U_BSDXSTART_U_BSDXEND 49 51 ; 50 N BSDXERR,BSDXIEN,BSDXDEP,BSDXTYPED,BSDXTYPE,BSDX ALO,BSDXBS,BSDXI,BSDXNEND,BSDXNSTART,BSDXPEND,BSDXRESD,BSDXRESN,BSDXS,BSDXZ,BSDXTMP,BSDXQ,BSDXNOT,BSDXNOD,BSDXAD52 N BSDXERR,BSDXIEN,BSDXDEP,BSDXTYPED,BSDXTYPE,BSDXBS,BSDXI,BSDXNEND,BSDXNSTART,BSDXPEND,BSDXRESD,BSDXRESN,BSDXS,BSDXZ,BSDXTMP,BSDXQ,BSDXNOT,BSDXNOD,BSDXAD 51 53 N BSDXSUBCD 52 54 S X="CASSET^BSDX04",@^%ZOSF("TRAP") … … 55 57 S BSDXY="^BSDXTMP("_$J_")" 56 58 S ^BSDXTMP($J,0)="D00030START_TIME^D00030END_TIME^I00010SLOTS^T00030RESOURCE^T00010ACCESS_TYPE^T00250NOTE^I00030AVAILABILITYID"_$C(30) 57 S BSDX ALO=0,BSDXI=259 S BSDXI=2 58 60 ; 59 61 ;Get Access Type IDs … … 66 68 . S $P(BSDXTYPED,"|",BSDXK)=$O(^BSDXTYPE("B",BSDXL,0)) 67 69 ; 68 D69 . S BSDXBS=070 . S BSDXRESN= BSDXRES70 N BSDXCOUN ; Counter 71 FOR BSDXCOUN=1:1:$L(BSDXRES,"|") DO ;smh - d in algo to do multiple res 72 . S BSDXRESN=$P(BSDXRES,"|",BSDXCOUN) 71 73 . Q:BSDXRESN="" 72 74 . Q:'$D(^BSDXRES("B",BSDXRESN)) 73 . S BSDXRESD=$O(^BSDXRES("B",BSDXRESN,0)) Q:'+BSDXRESD 75 . S BSDXRESD=$O(^BSDXRES("B",BSDXRESN,0)) 76 . Q:'+BSDXRESD 74 77 . Q:'$D(^BSDXAB("ARSCT",BSDXRESD)) 78 . S BSDXBS=0 75 79 . D STRES(BSDXRESN,BSDXRESD) 76 80 . Q 77 81 ; 82 ; V 1.5 -- All of this commented out; algo changed on C# side. 78 83 ;start, end, slots, resource, accesstype, note, availabilityid 79 84 ;I '+BSDXSRCH,BSDXALO D 80 I BSDXALO D81 . ;If first block start time > input start time then pad with new block82 . I BSDXBS>BSDXSTART K BSDXTMP D83 . . S Y=BSDXSTART X ^DD("DD") S Y=$TR(Y,"@"," ")84 . . S BSDXTMP=Y85 . . S Y=BSDXBS X ^DD("DD") S Y=$TR(Y,"@"," ")86 . . S BSDXTMP=BSDXTMP_"^"_Y_"^0^"_BSDXRESN_"^0^^0"_$C(30)87 . . S ^BSDXTMP($J,1)=BSDXTMP88 . ;89 . ;If first block start time < input start time then trim90 . I BSDXBS<BSDXSTART D91 . . S Y=BSDXSTART92 . . X ^DD("DD") S Y=$TR(Y,"@"," ")93 . . S $P(^BSDXTMP($J,2),U,1)=Y94 . ;95 . ;If last block end time < input end time then pad end with new block96 . I BSDXPEND<BSDXEND D97 . . S Y=BSDXPEND X ^DD("DD") S Y=$TR(Y,"@"," ")98 . . S BSDXTMP=Y99 . . S Y=BSDXEND X ^DD("DD") S Y=$TR(Y,"@"," ")100 . . S BSDXTMP=BSDXTMP_"^"_Y_"^0^"_BSDXRESN_"^0^^0"_$C(30)101 . . S ^BSDXTMP($J,BSDXI-1)=BSDXTMP102 . ;85 ; I BSDXALO D 86 ; . ;If first block start time > input start time then pad with new block 87 ; . I BSDXBS>BSDXSTART K BSDXTMP D 88 ; . . S Y=BSDXSTART X ^DD("DD") S Y=$TR(Y,"@"," ") 89 ; . . S BSDXTMP=Y 90 ; . . S Y=BSDXBS X ^DD("DD") S Y=$TR(Y,"@"," ") 91 ; . . S BSDXTMP=BSDXTMP_"^"_Y_"^0^"_BSDXRESN_"^0^^0"_$C(30) 92 ; . . S ^BSDXTMP($J,1)=BSDXTMP 93 ; . ; 94 ; . ;If first block start time < input start time then trim 95 ; . I BSDXBS<BSDXSTART D 96 ; . . S Y=BSDXSTART 97 ; . . X ^DD("DD") S Y=$TR(Y,"@"," ") 98 ; . . S $P(^BSDXTMP($J,2),U,1)=Y 99 ; . ; 100 ; . ;If last block end time < input end time then pad end with new block 101 ; . I BSDXPEND<BSDXEND D 102 ; . . S Y=BSDXPEND X ^DD("DD") S Y=$TR(Y,"@"," ") 103 ; . . S BSDXTMP=Y 104 ; . . S Y=BSDXEND X ^DD("DD") S Y=$TR(Y,"@"," ") 105 ; . . S BSDXTMP=BSDXTMP_"^"_Y_"^0^"_BSDXRESN_"^0^^0"_$C(30) 106 ; . . S ^BSDXTMP($J,BSDXI-1)=BSDXTMP 107 ; . ; 103 108 S ^BSDXTMP($J,BSDXI)=$C(31) 104 109 Q … … 157 162 S ^BSDXTMP($J,BSDXI)=BSDXZ_"^"_BSDXAD_$C(30) 158 163 S BSDXI=BSDXI+2 159 S BSDXALO=1 ;At Least One record will be returned160 164 Q
Note:
See TracChangeset
for help on using the changeset viewer.