SCAPMCU1 ;ALB/REW - TEAM API UTILITIES ; 7/12/99 9:33am ;07/06/2017
Source file <SCAPMCU1.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
INIT(SCOK) | ; setup date array & error arrays if none passed in
; VARIABLES SET: ; SCOK - SET TO 0 IF ERROR |
|
PCPOSCNT(SCTP,SCDATE,SCPCONLY,SCFUTURE) | ;this is a more efficient count of PC patients assigned to position
; Input: SCTP - ien to 404.57 ; SCDATE - date of concern, default=DT ; SCPCONLY - 1= must be pc, 0=all assignments 1=DEFAULT ; SCFUTURE - 1= include future, 0=current 0=DEFAULT ;;bp/cmf 177 |
|
TEAMCNT(SCTM,DATE) | ;this is a more efficient version of the count
|
|
TEAMCNT2(SCTM,DATE) | ;this is the count of patients assigned to the team on a date
; Input: SCTM - ien to 404.51 ; DATE - date of concern, default=DT |
|
ACTHISTB(FILE,IEN) | ;boolean active function
|
|
ACTHIST(FILE,IEN,SCDATES,SCERR) | ;is entry active for a time period?
|
|
LASTDATE(FILE,IEN) | ;gets last date for team or position from 404.52,404.58,404.59 - uses DATES function below
; Input Parameters: ; File = either 404.52 or 404.58 or 404.59 ; IEN = pointer to team(404.51) or team position(404.57) ; Returned: ; -1 if error,o/w latest date defined 0=no historical dates |
|
DATES(FILE,IEN,DATE) | ;used to return latest activation & inactivation date
; Input Parameters: ; File = either 404.52, 404.53, 404.58, or 404.59 ; IEN = pointer to team(404.51) or team position(404.57) ; DATE = default=DT ; Returned: ; status^actdate^inactdate^scien^first actdate? [1=yes/null=no] |
|
ST | ||
QTDATES | ||
ERR(SEQ,ERNUM,PARMS,OUTPUT,SCER) | ;-- process errors
|
|
OKTMPOS(TEAM,POSITION,DATE) | ;validate legitimate position in a team for a dt
; used in screen for pc practitioner position of patient team assngt |
|
CHK | ;
|
|
QTOKTP | ||
RSNDICS(EVCODE) | ; -- called by input transform and screen logic for type of reason
; Input: EVCODE = event code (e.g. ZM1) ; Used to check for fields that point to Scheduling Reason File ; Piece = Piece number of zero node of |
|
OKPREC(TEAM) | ; - called by screen logic for preceptor position file (#.1) of team position (#404.57) file
; Input; TEAM = Pointer to team file (#404.51) for team position with preceptor ; requires position being assigned to be a possible preceptor position ; AND that position is from the same team as the supervised position |
FileNo | Call Tags |
---|---|
^DI(.84 - [#.84] | GET1^DIQ |
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^SCPT(404.42 - [#404.42] | TEAMCNT+5, TEAMCNT+7, TEAMCNT+8 |
^SCPT(404.43 - [#404.43] | PCPOSCNT+12, PCPOSCNT+14, PCPOSCNT+15 |
^SCTM(404.51 - [#404.51] | CHK+4 |
^SCTM(404.57 - [#404.57] | CHK+7, CHK+13, OKPREC+4 |
^SD(403.43 - [#403.43] | RSNDICS+4 |
^TMP("SC TMP LIST" | INIT+12! |
^TMP("SCERR" | INIT+11! |
^TMP("SCTEAMS" | TEAMCNT2+10, TEAMCNT2+11! |
Name | Field # of Occurrence |
---|---|
^(0 | RSNDICS+4 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
ACTDT | ST~, ST+14*, ST+17*, ST+19*, ST+21, ST+22, ST+24, QTDATES |
DATE | TEAMCNT~, TEAMCNT+3*, TEAMCNT+9, TEAMCNT+10, TEAMCNT2~, TEAMCNT2+4, DATES~, ST+1*, ST+9, ST+22 , OKTMPOS~, CHK+10, CHK+11, CHK+17 |
DFN | TEAMCNT+1~, TEAMCNT+4*, TEAMCNT+5*, TEAMCNT+7, TEAMCNT2+9*, TEAMCNT2+10* |
DT | PCPOSCNT+8, TEAMCNT+3, TEAMCNT2+4, ST+1 |
EFFDT | ST~, ST+9*, ST+14, ST+17, ST+19 |
ERNUM | ERR~, ERR+2*, ERR+3*, ERR+6, ERR+10 |
EVCODE | RSNDICS~, RSNDICS+4 |
FILE | ACTHISTB~, ACTHISTB+2, ACTHIST~, ACTHIST+2, LASTDATE~, LASTDATE+7, DATES~, ST+5, ST+8 |
FUTURE | ST~, ST+19*, QTDATES |
HISTIEN | TEAMCNT+1~, TEAMCNT+6*, TEAMCNT+7*, TEAMCNT+8 |
IEN | ACTHISTB~, ACTHISTB+2, ACTHIST~, ACTHIST+2, LASTDATE~, LASTDATE+7, DATES~, ST+5 |
INACTDT | ST~, ST+21*, ST+22, ST+24, QTDATES |
OUTPUT | ERR~, ERR+10 |
PARMS | ERR~, ERR+10 |
POSITION | OKTMPOS~, CHK+7, CHK+8, CHK+13, CHK+17 |
PREVDT | ST~ |
PREVST | ST~ |
ROOT | ST~, ST+8*, ST+10, ST+24 |
>> SCBEGIN | INIT+21*, INIT+25 |
SCCNT | PCPOSCNT+6~, PCPOSCNT+11*, PCPOSCNT+20*, PCPOSCNT+21, TEAMCNT+1~, TEAMCNT+4*, TEAMCNT+11*, TEAMCNT+12 |
SCDATE | PCPOSCNT~, PCPOSCNT+8*, PCPOSCNT+16, PCPOSCNT+18 |
SCDATES | INIT+19*, INIT+21, INIT+22, INIT+23, INIT+25, INIT+26, INIT+27, TEAMCNT2+3~, ACTHIST~, ACTHIST+2 |
SCDATES("BEGIN" | TEAMCNT2+4*, TEAMCNT2+5 |
SCDATES("END" | TEAMCNT2+5* |
>> SCEND | INIT+22*, INIT+26 |
SCER | ERR~, ERR+4 |
SCER( | ERR+6* |
SCER(0 | ERR+8* |
SCERR | INIT+11*, INIT+13, INIT+14, INIT+15, INIT+18, TEAMCNT2+3~, ACTHIST~, ACTHIST+2, CHK+3*, CHK+6 , CHK+9, CHK+12 |
>> SCESEQ | INIT+10*, INIT+15, INIT+18, INIT+24*, CHK+6, CHK+9, CHK+12 |
SCFUTURE | PCPOSCNT~, PCPOSCNT+10*, PCPOSCNT+18 |
SCHSTIEN | PCPOSCNT+6~, PCPOSCNT+13*, PCPOSCNT+14*, PCPOSCNT+15 |
SCIEN | ST~, ST+25*, QTDATES |
>> SCINCL | INIT+23*, INIT+27 |
SCLAST | ST~ |
>> SCLIST | INIT+12*, INIT+16, INIT+17 |
>> SCLSEQ | INIT+10*, INIT+24* |
>> SCN | INIT+10*, INIT+24* |
SCNODE | PCPOSCNT+6~, PCPOSCNT+15*, PCPOSCNT+16, PCPOSCNT+18, PCPOSCNT+19, TEAMCNT+1~, TEAMCNT+8*, TEAMCNT+9, TEAMCNT+10 |
SCNOW | INIT+9~, INIT+20*, INIT+21, INIT+22 |
SCOK | INIT~, INIT+13*, INIT+16*, CHK+1~, CHK+2*, CHK+18*, QTOKTP |
>> SCPARM | INIT+15, INIT+18, CHK+6, CHK+9, CHK+12 |
>> SCPARM("DATE" | CHK+11* |
>> SCPARM("ERROR | ARRAY" , INIT+14* |
>> SCPARM("OUTPU | T ARRAY" , INIT+17* |
>> SCPARM("POSITION" | CHK+8* |
>> SCPARM("TEAM" | CHK+5* |
SCPCONLY | PCPOSCNT~, PCPOSCNT+9*, PCPOSCNT+19 |
SCPOS0 | CHK+1~, CHK+13*, CHK+15 |
SCPTPA | PCPOSCNT+6~, PCPOSCNT+11*, PCPOSCNT+12*, PCPOSCNT+14 |
SCSTAT | ST~, ST+3*, ST+20*, ST+23*, ST+24 |
SCTEAMS | TEAMCNT2+3~ |
SCTM | TEAMCNT~, TEAMCNT+2, TEAMCNT+5, TEAMCNT+7, TEAMCNT2~, TEAMCNT2+6 |
SCTODAY | ST~, ST+2* |
SCTP | PCPOSCNT~, PCPOSCNT+7, PCPOSCNT+12, PCPOSCNT+14, CHK+1~ |
SCX | TEAMCNT2+3~, TEAMCNT2+6*, TEAMCNT2+7, LASTDATE+6~, LASTDATE+7*, LASTDATE+8 |
SEQ | ERR~, ERR+5*, ERR+6 |
STATUS | ST~, ST+2*, ST+22*, ST+23, ST+27*, QTDATES |
TEAM | OKTMPOS~, CHK+4, CHK+5, CHK+15, OKPREC~, OKPREC+4 |
U | PCPOSCNT+16, PCPOSCNT+18, PCPOSCNT+19, TEAMCNT+9, TEAMCNT+10, LASTDATE+8, QTDATES, CHK+15, RSNDICS+4, OKPREC+4 |
X | TEAMCNT2+3~, TEAMCNT2+7*, TEAMCNT2+10*, TEAMCNT2+12, ST~, ST+10*, ST+12, ST+14, ST+17, ST+19 , ST+21, ST+24*, ST+25 |
>> Y | OKPREC+4 |