SCAPMC28 ;ALB/REW - Patients with an Appointment ; 1/10/05 2:49pm
Source file <SCAPMC28.m>
action | A | extended action | Ea | event driver | Ed | subscriber | Su | protocol | O | limited protocol | LP | run routine | RR | broker | B | edit | E | server | Se | P | screenman | SM | inquire | I |
Package | Total | Caller Graph |
---|---|---|
Scheduling | 4 | SCAPMC SCAPMC27 SCMCBK SCMCBK1 |
Name | Comments | DBIA/ICR reference |
---|---|---|
PTAP(SCCL,SCDATES,SCMAXCNT,SCLIST,SCERR,MORE) | ; -- list of patients with an appointment in a given clinic
; ; input: ; SCCL = Pointer to File #44 ; SCDATES("BEGIN") = begin date to search (inclusive) ; [default: TODAY] ; ("END") = end date to search (inclusive) ; [default: TODAY] ; ("INCL") = 1: only use patients who were assigned to ; team for entire date range ; 0: anytime in date range ; [default: 1] ; SCMAXCNT - Maximum # of patients to return, default=99 ; SCLIST -array name to store list ; [ex. ^TMP("SCPT",$J)] ; ; SCERR = array NAME to store error messages. ; [ex. ^TMP("ORXX",$J)] ; MORE - This is a flag that says that this list exists and has been ; aborted because it reached the maxcount. If this =1 it means ; 'kill the old list & start where you finished' ; Note: Don't Return DFNs where $D(^TMP("SCMC",$J,"EXCLUDE PT","SCPTA",+DFN)) is true ; Output: ; SCLIST() = array of patients ; Format: ; Subscript: Sequential # from 1 to n ; Piece Description ; 1 IEN of PATIENT file entry ; 2 Name of patient ; 3 ien to 40.7 - Not Stop Code!! stp=$$intstp ; 4 AMIS reporting stop code ; 5 Patient's Long ID (SSN) |
|
ST | ||
LP | ||
APQ | ||
PTAPX(SCCL,SCBEGIN,SCEND,MAXCNT,SCLIST,SCERR,SCSTART) | ;return appointments in dt range
; Input: (As above plus:) ; SCSTART - Continue with list at this point ; output: SCN - COUNT OF PTS ; returns: dfn^ptname^clinic^apptdt^long id ; |
|
OKDATA() | ;check/setup variables
|
FileNo | Call Tags |
---|---|
^DPT - [#2] | GETS^DIQ |
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^SC - [#44] | OKDATA+5 |
^TMP("SCMC" | PTAPX+56 |
^TMP($J | PTAPX+8!, PTAPX+20!, PTAPX+33!, PTAPX+37, PTAPX+38, PTAPX+40!, PTAPX+43, PTAPX+44, PTAPX+45*, PTAPX+46! , PTAPX+50, PTAPX+52, PTAPX+68! |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
DFN | PTAPX+7~, PTAPX+27*, PTAPX+52*, PTAPX+55, PTAPX+56, PTAPX+61, PTAPX+64, PTAPX+66, PTAPX+72 |
MAXCNT | PTAPX~ |
MORE | PTAP~, LP+2 |
SCARRAY | PTAPX+7~ |
SCARRAY(2 | PTAPX+64 |
SCBEGIN | ST+1~, LP, LP+4*, APQ, PTAPX~, PTAPX+12 |
SCCL | PTAP~, APQ, PTAPX~, PTAPX+12, PTAPX+64, PTAPX+72, OKDATA+5, OKDATA+6 |
SCDATES | PTAP~ |
SCDT | LP*, PTAPX+7~, PTAPX+29*, PTAPX+50*, PTAPX+52, PTAPX+64, PTAPX+72 |
SCDTS | ST+1~ |
SCEND | ST~, ST+1~, LP+1*, APQ, PTAPX~, PTAPX+12 |
SCERR | PTAP~, APQ, PTAPX~, PTAPX+17, PTAPX+19, PTAPX+73, OKDATA+7 |
SCESEQ | ST+1~, PTAPX+19, OKDATA+7 |
SCINCL | ST+1~ |
SCLIST | PTAP~, LP+3, LP+4, LP+5, APQ, PTAPX~, PTAPX+55, PTAPX+58, PTAPX+59, PTAPX+64 , PTAPX+66, PTAPX+72 |
SCLSEQ | ST+1~ |
SCMAXCNT | PTAP~, APQ, PTAPX+17, PTAPX+50, PTAPX+52, PTAPX+72, PTAPX+73, OKDATA+3* |
SCN | ST+1~, PTAPX+17, PTAPX+50, PTAPX+52, PTAPX+58*, PTAPX+59, PTAPX+64, PTAPX+66, PTAPX+72, PTAPX+73 |
SCOK | OKDATA+1~, OKDATA+2*, OKDATA+4, OKDATA+5*, OKDATA+9 |
SCP | ST+1~ |
SCPARM | ST+1~, OKDATA+7 |
SCPARM("CLINIC" | OKDATA+6* |
SCSTART | ST~, LP+3*, APQ, PTAPX~, PTAPX+27, PTAPX+28* |
SCVSDT | ST~ |
SDAPTCNT | PTAPX+7~, PTAPX+15*, PTAPX+17, PTAPX+22 |
SDARRAY | PTAPX+7~, PTAPX+15 |
SDARRAY("FLDS" | PTAPX+12* |
SDARRAY("SORT" | PTAPX+13* |
SDARRAY(1 | PTAPX+12* |
SDARRAY(2 | PTAPX+12* |
SDERR | PTAPX+7~ |
SDX | PTAPX+7~, PTAPX+36*, PTAPX+37*, PTAPX+38, PTAPX+40, PTAPX+42*, PTAPX+43*, PTAPX+44, PTAPX+45 |
SDY | PTAPX+7~, PTAPX+36*, PTAPX+38*, PTAPX+40, PTAPX+42*, PTAPX+44*, PTAPX+45 |
U | LP+3, LP+4, PTAPX+17, PTAPX+40, PTAPX+64, PTAPX+72, PTAPX+73 |