PXRMDATE ;SLC/PKR - Clinical Reminders date utilities. ;06/28/2022
Source file <PXRMDATE.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
CEFD(FDA) | ;Called by the Exchange Utility only if the input packed
|
|
COMPARE(X) | ;Compare beginning and ending dates, give a warning if
|
|
COTN(EFP) | ;Convert an Effective Period to the new date/time format.
|
|
CRDUEDATE(CRSTATUS,CRDUEDATE,DEFARR,FIEVAL) | ;Determine the C/R due date. If the C/R
|
|
REFUSED | ||
CTD(MULT,NUM) | ;Convert months or years to days.
|
|
CTFMD(DATE) | ;Convert DATE which may be in any of the FileMan acceptable
|
|
DCHECK(DATE) | ;Trap for special characters before calling CTFMD^PXRMDATE.
|
|
DDATE(DATE,FMT) | ;Check for an historical (event) date, format as appropriate.
|
|
DUE(DEFARR,RESDATE,FREQ,DUE,DUEDATE,FIEVAL) | ;Compute the due date.
|
|
SETDUE | ;If the due date is less than or equal to now date the
|
|
DURATION(START,STOP) | ;Return the number days between the Start Date and
|
|
EDATE(DATE) | ;Check for an historical (event) date, format as appropriate,
|
|
FMDATE(DFN,TEST,DATE,VALUE,TEXT) | ;FileMan date computed finding.
|
|
FULLDATE(DATE) | ;See if DATE is a full date, i.e., it has a month and
|
|
FRQINDAY(FREQ) | ;Given a frequency in the form ND, NM, or NY where N is a
|
|
ISFULDTE(DATE) | ; Function to check for full FileMan date.
|
|
ISLEAP(YEAR) | ;Given a 3 digit FileMan year return 1 if it is a leap year,
|
|
MCALC(FMDATE,OP,NUM) | ;Add or subtract NUM months to FMDATE.
|
|
MID() | ;If the reminder global PXRMDATE is defined return midnight on that day,
|
|
NEWDATE(FMDATE,OP,OFFSET) | ;Given an internal FileMan date, an operator of
|
|
NOON() | ;If the reminder global PXRMDATE is defined return noon on that day,
|
|
NOW() | ;If the reminder global PXRMDATE is defined return it, otherwise
|
|
TODAY() | ;If the reminder global PXRMDATE is defined return it, otherwise
|
|
VDATE(VIEN) | ;Given a visit ien return the visit date.
|
|
VOFFSET(OFFSET) | ;Make sure the offset part of a date is valid. It has to
|
|
VSYM(SYM) | ;Make sure the symbolic part of a date is valid.
|
|
YCALC(FMDATE,OP,NUM) | ;Add or subtract NUM years to FMDATE.
|
Name | Field # of Occurrence |
---|---|
EN^DDIOL | COMPARE+20, CTFMD+19 |
DT^DILF | CTFMD+15, CTFMD+28 |
$$CDUEDATE^PXRMCDUE | DUE+12 |
$$CTFMD^PXRMDATE | COMPARE+8, COMPARE+12, DCHECK+6, FMDATE+6, FMDATE+7 |
$$NOW^PXRMDATE | SETDUE+2, DURATION+4 |
EVAL^PXRMFF | CRDUEDATE+35, REFUSED+24 |
$$ISHIST^PXRMVSIT | VDATE+5 |
$$DT^XLFDT | MID+2, NOON+2, TODAY+2 |
$$FMADD^XLFDT | CRDUEDATE+42, REFUSED+31, NEWDATE+10, NEWDATE+11, NEWDATE+12 |
$$FMDIFF^XLFDT | DURATION+7 |
$$FMTE^XLFDT | DDATE+2, EDATE+4 |
$$NOW^XLFDT | NOW+2, NOW+5 |
$$UP^XLFSTR | COTN+2, CTFMD+6 |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^AUPNVSIT - [#9000010] | VDATE+2 |
^TMP( | DUE+17*, FULLDATE+13*, FULLDATE+17* |
Name | Line Occurrences |
---|---|
$$CTD | FRQINDAY+10 |
$$FULLDATE | DUE+22 |
$$ISLEAP | MCALC+7, YCALC+8 |
$$MCALC | NEWDATE+13 |
$$MID | CTFMD+25 |
$$NEWDATE | CTFMD+32, DUE+22, SETDUE+9 |
$$NOON | CTFMD+25 |
$$NOW | CTFMD+25 |
$$TODAY | CTFMD+25 |
$$VOFFSET | CTFMD+17 |
$$VSYM | CTFMD+15 |
$$YCALC | NEWDATE+14 |
REFUSED | CRDUEDATE+8, CRDUEDATE+11 |
SETDUE | DUE+13 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
BDT | COMPARE+5~, COMPARE+8*, COMPARE+9, COMPARE+16, COMPARE+17*, COMPARE+19 |
CRDUEDATE | CRDUEDATE~, CRDUEDATE+23*, CRDUEDATE+24, CRDUEDATE+26, CRDUEDATE+28, CRDUEDATE+42*, CRDUEDATE+44, REFUSED+12*, REFUSED+13, REFUSED+15 , REFUSED+17, REFUSED+31* |
CRFIEVAL | CRDUEDATE+7~, CRDUEDATE+19*, CRDUEDATE+35, REFUSED+8*, REFUSED+24 |
CRFIEVAL( | CRDUEDATE+39, CRDUEDATE+40, REFUSED+28, REFUSED+29 |
CRFIEVAL("CONTRA" | CRDUEDATE+32!, CRDUEDATE+33! |
CRFIEVAL("REFUSED" | REFUSED+21!, REFUSED+22! |
CRSTATUS | CRDUEDATE~, CRDUEDATE+8, CRDUEDATE+43 |
DATE | CTFMD~, CTFMD+4, CTFMD+5, CTFMD+6, CTFMD+15, DCHECK~, DCHECK+2, DCHECK+3, DCHECK+4, DCHECK+5 , DCHECK+6, DDATE~, DDATE+1, DDATE+2, DUE+5~, DUE+22*, EDATE~, EDATE+2, EDATE+3, EDATE+4 , FMDATE~, FMDATE+6*, FMDATE+7*, FULLDATE~, FULLDATE+5, FULLDATE+7, FULLDATE+8, FULLDATE+9, FULLDATE+20, ISFULDTE~ , ISFULDTE+2, ISFULDTE+3, ISFULDTE+4, VDATE+1~, VDATE+2*, VDATE+3*, VDATE+5*, VDATE+6 |
DAY | FULLDATE+4~, FULLDATE+7*, FULLDATE+10, FULLDATE+11*, FULLDATE+19, ISFULDTE+1~, ISFULDTE+2*, MCALC+1~, MCALC+2*, MCALC+8* , MCALC+9, YCALC+1~, YCALC+2*, YCALC+8*, YCALC+9 |
DAYS | CTD+1~, CTD+2*, CTD+4, CTD+5, CTD+6*, CTD+7, NEWDATE+4~, NEWDATE+11*, NEWDATE+12* |
DEFARR | CRDUEDATE~, CRDUEDATE+35, REFUSED+24, DUE~, DUE+12 |
DEFARR("IEN" | DUE+6 |
DEFARR(0 | SETDUE+5 |
DEFARR(35 | DUE+16 |
DEFARR(45 | DUE+12 |
DEFARR(80 | CRDUEDATE+11, CRDUEDATE+20 |
DEFARR(81 | CRDUEDATE+21, CRDUEDATE+22 |
DEFARR(90 | REFUSED, REFUSED+9 |
DEFARR(91 | REFUSED+10, REFUSED+11 |
DFN | FMDATE~ |
DIAT | DUE+5~, SETDUE+5*, SETDUE+6, SETDUE+9 |
DIATOK | DUE+5~, SETDUE+6*, SETDUE+7*, SETDUE+9 |
DIM | MCALC+1~, MCALC+7*, MCALC+8 |
DONE | CRDUEDATE+7~, CRDUEDATE+27*, CRDUEDATE+28, CRDUEDATE+32*, REFUSED+16*, REFUSED+17, REFUSED+21* |
>> DTOUT | DCHECK+2 |
DUE | DUE~, DUE+8*, DUE+18*, DUE+21*, SETDUE+3*, SETDUE+10* |
DUEDATE | DUE~, DUE+8*, DUE+10*, DUE+12*, DUE+13, DUE+18*, DUE+21*, DUE+22*, SETDUE+3, SETDUE+9 |
EDT | COMPARE+5~, COMPARE+10*, COMPARE+11*, COMPARE+12*, COMPARE+13, COMPARE+15*, COMPARE+16, COMPARE+18*, COMPARE+19 |
EFP | COTN~, COTN+2*, COTN+3, COTN+4, COTN+5*, COTN+6 |
FDA | CEFD~ |
FDA( | CEFD+4, CEFD+5, CEFD+7, CEFD+8*, CEFD+9! |
FF | CRDUEDATE+7~ |
FF( | CRDUEDATE+39*, REFUSED+28* |
FI | CRDUEDATE+7~ |
FI( | CRDUEDATE+40*, REFUSED+29* |
FIEVAL | CRDUEDATE~, CRDUEDATE+19, REFUSED+8, DUE~, DUE+12 |
FIEVAL("CONTRA" | CRDUEDATE+14, CRDUEDATE+16, CRDUEDATE+17 |
FIEVAL("REFUSED" | REFUSED+3, REFUSED+5, REFUSED+6 |
FIND | CRDUEDATE+7~, CRDUEDATE+13*, CRDUEDATE+14*, CRDUEDATE+16, CRDUEDATE+17, CRDUEDATE+18, CRDUEDATE+25*, CRDUEDATE+26*, CRDUEDATE+28, CRDUEDATE+32 , CRDUEDATE+33, REFUSED+2*, REFUSED+3*, REFUSED+5, REFUSED+6, REFUSED+7, REFUSED+14*, REFUSED+15*, REFUSED+17, REFUSED+21 , REFUSED+22 |
FINDING | CRDUEDATE+7~, CRDUEDATE+38*, CRDUEDATE+39, CRDUEDATE+40, REFUSED+27*, REFUSED+28, REFUSED+29 |
FLIST | CRDUEDATE+7~, CRDUEDATE+22*, CRDUEDATE+38, REFUSED+11*, REFUSED+27 |
FMDATE | CTFMD+2~, CTFMD+15, CTFMD+28, CTFMD+29, MCALC~, MCALC+2, MCALC+3, NEWDATE~, NEWDATE+5, NEWDATE+10 , NEWDATE+11, NEWDATE+12, NEWDATE+13, NEWDATE+14, YCALC~, YCALC+2, YCALC+3 |
FMT | DDATE~, DDATE+2 |
FRAC | CTD+1~, CTD+5*, CTD+6 |
FREQ | DUE~, DUE+8, DUE+16, DUE+22, FRQINDAY~, FRQINDAY+3, FRQINDAY+5, FRQINDAY+6, FRQINDAY+7 |
HOURS | NEWDATE+4~, NEWDATE+10* |
IND | CEFD+2~, CEFD+3*, CEFD+4*, CEFD+5, CEFD+7, CEFD+8, CEFD+9, CRDUEDATE+7~, CRDUEDATE+37*, CRDUEDATE+38 , REFUSED+26*, REFUSED+27 |
INTDAYS | CTD+1~, CTD+4*, CTD+5, CTD+6 |
LDATE | DUE+5~, DUE+20*, DUE+21, DUE+22 |
LEN | FRQINDAY+4~, FRQINDAY+6*, FRQINDAY+7 |
LOGIC | CRDUEDATE+7~, CRDUEDATE+20*, CRDUEDATE+41, REFUSED+9*, REFUSED+30 |
LOGICTEST | CRDUEDATE+7~, CRDUEDATE+41*, CRDUEDATE+42, REFUSED+30*, REFUSED+31 |
MISSING | FULLDATE+4~, FULLDATE+6*, FULLDATE+12*, FULLDATE+16*, FULLDATE+18 |
MONTH | FULLDATE+4~, FULLDATE+8*, FULLDATE+14, FULLDATE+15*, FULLDATE+19, ISFULDTE+1~, ISFULDTE+3*, MCALC+1~, MCALC+2*, MCALC+5* , MCALC+6*, MCALC+8, MCALC+9, YCALC+1~, YCALC+2*, YCALC+8, YCALC+9 |
MULT | CTD~, CTD+2 |
NOW | DUE+5~, SETDUE+2*, SETDUE+3, SETDUE+10, NOW+3~, NOW+5*, NOW+6*, NOW+7 |
NUM | COTN+4*, COTN+5, CRDUEDATE+7~, CRDUEDATE+21*, CRDUEDATE+37, REFUSED+10*, REFUSED+26, CTD~, CTD+2, FRQINDAY+4~ , FRQINDAY+5*, FRQINDAY+10*, FRQINDAY+11, MCALC~, MCALC+5*, MCALC+6*, NEWDATE+4~, NEWDATE+6*, NEWDATE+7, NEWDATE+8 , NEWDATE+10, NEWDATE+11, NEWDATE+12, NEWDATE+13, NEWDATE+14, YCALC~, YCALC+5*, YCALC+6* |
OCC | CRDUEDATE+7~, CRDUEDATE+15*, CRDUEDATE+16*, CRDUEDATE+17, CRDUEDATE+18, CRDUEDATE+27*, CRDUEDATE+28*, CRDUEDATE+32, CRDUEDATE+33, REFUSED+4* , REFUSED+5*, REFUSED+6, REFUSED+7, REFUSED+16*, REFUSED+17*, REFUSED+21, REFUSED+22 |
OFFSET | CTFMD+2~, CTFMD+13*, CTFMD+17, CTFMD+18, CTFMD+19, CTFMD+32, NEWDATE~, NEWDATE+6, NEWDATE+8, VOFFSET~ , VOFFSET+3 |
OP | CTFMD+2~, CTFMD+11*, CTFMD+12, CTFMD+13, CTFMD+32, MCALC~, MCALC+5, MCALC+6, NEWDATE~, NEWDATE+10 , NEWDATE+11, NEWDATE+12, NEWDATE+13, NEWDATE+14, YCALC~, YCALC+5, YCALC+6 |
>> PXRMDATE | MID+2, NOON+2, NOW+2, NOW+4, NOW+5, NOW+6, TODAY+2 |
>> PXRMEXCH | COMPARE+4 |
>> PXRMINTR | CTFMD+19, CTFMD+22 |
PXRMITEM | DUE+5~, DUE+6*, DUE+17, FULLDATE+13, FULLDATE+17 |
PXRMNOW | DURATION+3~, DURATION+4*, DURATION+5, DURATION+6 |
>> PXRMPID | DUE+17, FULLDATE+13, FULLDATE+17 |
RESDATE | DUE~, DUE+20 |
START | DURATION~, DURATION+2, DURATION+5, DURATION+7 |
STOP | DURATION~, DURATION+6*, DURATION+7 |
SYM | CTFMD+2~, CTFMD+12*, CTFMD+15, CTFMD+18, CTFMD+19, CTFMD+25, VSYM~, VSYM+2, VSYM+3, VSYM+5 , VSYM+6, VSYM+7, VSYM+8, VSYM+10, VSYM+11, VSYM+12, VSYM+13 |
SYMV | CTFMD+2~, CTFMD+25*, CTFMD+27*, CTFMD+28, CTFMD+29*, CTFMD+31, CTFMD+32 |
TDATE | CTFMD+2~, CTFMD+6*, CTFMD+8*, CTFMD+11, CTFMD+12, CTFMD+13, FMDATE+3~, FMDATE+4*, FMDATE+5, FMDATE+6 , FULLDATE+4~, FULLDATE+5*, FULLDATE+19*, FULLDATE+20*, FULLDATE+21 |
TDDUE | DUE+5~, SETDUE+9*, SETDUE+10 |
TEMP | CRDUEDATE+7~, CRDUEDATE+39*, REFUSED+28* |
TEST | FMDATE~, FMDATE+1*, FMDATE+2, FMDATE+4, FMDATE+5*, FMDATE+6*, FMDATE+7* |
TEXT | COMPARE+5~, COMPARE+19*, COMPARE+20, FMDATE~ |
TIME | CTFMD+2~, CTFMD+8*, CTFMD+26, CTFMD+27, MCALC+1~, MCALC+3*, MCALC+4*, MCALC+9, NOW+3~, NOW+4* , NOW+5*, YCALC+1~, YCALC+3*, YCALC+4*, YCALC+9 |
U | CRDUEDATE+21, CRDUEDATE+22, REFUSED+10, REFUSED+11, SETDUE+5, VDATE+2 |
UNIT | FRQINDAY+4~, FRQINDAY+7*, FRQINDAY+10, NEWDATE+4~, NEWDATE+8*, NEWDATE+9*, NEWDATE+10, NEWDATE+11, NEWDATE+12, NEWDATE+13 , NEWDATE+14 |
VALUE | FMDATE~, FMDATE+6*, FMDATE+7* |
VIEN | VDATE~, VDATE+2, VDATE+5 |
WUDT | CRDUEDATE+7~, CRDUEDATE+17*, CRDUEDATE+18, CRDUEDATE+23*, CRDUEDATE+24*, CRDUEDATE+26, CRDUEDATE+28, CRDUEDATE+30, CRDUEDATE+42, REFUSED+6* , REFUSED+7, REFUSED+12*, REFUSED+13*, REFUSED+15, REFUSED+17, REFUSED+19, REFUSED+31 |
WUDTC | CRDUEDATE+7~ |
WUDTC( | CRDUEDATE+18*, CRDUEDATE+24, CRDUEDATE+26, CRDUEDATE+28 |
WUDTR | CRDUEDATE+7~ |
WUDTR( | REFUSED+7*, REFUSED+13, REFUSED+15, REFUSED+17 |
X | COMPARE~ |
X(1 | COMPARE+8, COMPARE+17 |
X(2 | COMPARE+10, COMPARE+18 |
YEAR | FULLDATE+4~, FULLDATE+9*, FULLDATE+19, ISFULDTE+1~, ISFULDTE+4*, ISLEAP~, ISLEAP+2*, ISLEAP+3, MCALC+1~, MCALC+2* , MCALC+5*, MCALC+6*, MCALC+7, MCALC+9, YCALC+1~, YCALC+2*, YCALC+5*, YCALC+6*, YCALC+8, YCALC+9 |