Changeset 623 for WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCAPMC30.m
- Timestamp:
- Dec 4, 2009, 12:11:15 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCAPMC30.m
r613 r623 1 SCAPMC30 2 ;;5.3;Scheduling;**41,520**;AUG 13, 1993;Build 26 3 4 TPCL(SC44,SCDATES,SCPOSA,SCUSRA,SCPURPA,SCROLEA,SCLIST,SCERR) 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 ST 56 57 58 59 60 S SCTP=0 F S SCTP=$O(^SCTM(404.57,"E",SC44,SCTP)) Q:'SCTP D Q:'SCOK61 62 63 64 65 66 67 68 69 70 71 72 73 74 CLTPQ 75 76 OKDATA() 77 78 79 80 81 82 83 1 SCAPMC30 ;ALB/REW - TEAM APIs:TPCL ; 30 Jun 95 2 ;;5.3;Scheduling;**41**;AUG 13, 1993 3 ;;1.0 4 TPCL(SC44,SCDATES,SCPOSA,SCUSRA,SCPURPA,SCROLEA,SCLIST,SCERR) ; -- list of positions for a clinic 5 ; input: 6 ; SC44 = ien of HOSPITAL LOCATION <FILE#44> [required] 7 ; SCDATES("BEGIN") = begin date to search (inclusive) 8 ; [default: TODAY] 9 ; ("END") = end date to search (inclusive) 10 ; [default: TODAY] 11 ; ("INCL") = 1: only use patients who were assigned to 12 ; team for entire date range 13 ; 0: anytime in date range 14 ; [default: 1] 15 ; SCPOSA -array of pointers to team position - 404.57 (per SCPURPA) 16 ; SCUSRA -array of pointers to user file - 8930 (per SCPURPA array) 17 ; SCPURPA -array of pointers to team purpose file 403.47 18 ; if none are defined - returns all teams 19 ; if @SCPURPA@('exclude') is defined - exclude listed teams 20 ; SCROLEA - array of pointers to std position file 403.46 (per SCPURPA) 21 ; SCLIST -array name to store list 22 ; [ex. ^TMP("SCPT",$J)] 23 ; 24 ; SCERR = array NAME to store error messages. 25 ; [ex. ^TMP("ORXX",$J)] 26 ; 27 ; Output: 28 ; SCLIST() = array of positions (includes SCTP xref) 29 ; Format: 30 ; Subscript: Sequential # from 1 to n 31 ; Piece Description 32 ; 1 IEN of TEAM POSITION File (#404.57) 33 ; 2 Name of Position 34 ; 3 IEN of Team #404.51 35 ; 4 IEN of file #404.59 (Tm Pos History) 36 ; 5 current effective date 37 ; 6 current inactivate date (if any) 38 ; 7 pointer to 403.46 (role) 39 ; 8 Name of Standard Role 40 ; 9 pointer to User Class (#8930) 41 ; 10 Name of User Class 42 ; Subscript: "SCTP",SCTM,IEN ="" 43 ; 44 ; SCERR() = Array of DIALOG file messages(errors) . 45 ; @SCERR@(0) = number of errors, undefined if none 46 ; Format: 47 ; Subscript: Sequential # from 1 to n 48 ; Piece Description 49 ; 1 IEN of DIALOG file 50 ; Returned: 1 if ok, 0 if error 51 ; Other: 52 ; SCACTHIS = status (-1:err|0:inact|1:act)^404.52 ien ^actdt^inacdt 53 ; 54 ; 55 ST N SCPTTP,SCPTTP0,SCTP,SCR,SCACTHIS,SCTM,SCND,SCU,SCOK,SCP,SCTPCL 56 N SCLSEQ,SCN,SCESEQ,SCPARM,SCBEGIN,SCEND,SCINCL,SCDTS 57 ; -- initialize control variables 58 S SCOK=1 59 G:'$$OKDATA CLTPQ 60 S SCTP=0 F S SCTP=$O(^SCTM(404.57,"D",SC44,SCTP)) Q:'SCTP D Q:'SCOK 61 .S SCTP0=$G(^SCTM(404.57,SCTP,0)) 62 .IF '$L(SCTP0) D 63 ..S SCPARM("POSITION")=$G(SCTP,"Undefined") 64 ..S SCPARM("CLINIC")=$G(SC44,"Undefined") 65 ..D ERR^SCAPMCU1(.SCESEQ,4045101,.SCPARM,"",.SCERR) 66 .S SCTM=$P($G(^SCTM(404.57,SCTP,0)),U,2) 67 .S SCP=$P(^SCTM(404.51,+SCTM,0),U,3) 68 .Q:'$$OKARRAY^SCAPU1(.SCPURPA,.SCP) 69 .S SCR=+$P(^SCTM(404.57,SCTP,0),U,3) 70 .Q:'$$OKARRAY^SCAPU1(.SCROLEA,.SCR) 71 .S SCACTHIS=$$ACTHIST^SCAPMCU2(404.59,SCTP,SCDATES,SCERR,"SCTPCL") 72 .Q:'SCACTHIS 73 .D BLD^SCAPMC24(.SCLIST,SCTM,SCTP,SCACTHIS,SCR) 74 CLTPQ Q $G(@SCERR@(0))<1 75 ; 76 OKDATA() ;check/setup variables - return 1 if ok; 0 if error 77 N SCOK 78 S SCOK=1 79 D INIT^SCAPMCU1(.SCOK) ; set default dates & error array (if undefined) 80 IF '$D(^SC(+$G(SC44),0)) D S SCOK=0 81 . S SCPARM("CLINIC")=$G(SC44,"Undefined") 82 . D ERR^SCAPMCU1(.SCESEQ,4045101,.SCPARM,"",.SCERR) 83 Q SCOK
Note:
See TracChangeset
for help on using the changeset viewer.