ALPBUTL3 ;OIFO-DALLAS MW,SED,KC-BCBU BACKUP REPORT FUNCTIONS AND UTILITIES ;01/01/03
Source file <ALPBUTL3.m>
| Name | Comments | DBIA/ICR reference | 
|---|---|---|
| DEFML() | ; fetch and return default med log print... ; returns default number of med log entries to print based on entry in ; MED-LOG NUMBER field in BCMA BACKUP PARAMETERS file (53.71) | |
| START(DAY) | ;Get current date | |
| LSTACT | ; Build a cross reference by patient by drug to keep up ; with the last action of the drug. The x-ref is built but stays ; even if order is purged. The x-ref gets removed when the patient ; is purged. ; ^ALPB(53.1,DFN,"LSTACT",DRUG,ACTION DATE)=PERSON^ACTION | |
| LACT(ALPDFN,ALPDRUG) | ;  Retrieve the last action infor for a patient ; for a certian drug ; ALPDFN = Patient DFN ; ALPDRUG = Drug Ordable Item IEN | |
| ARRAY(DAY) | ||
| DEFPR() | ; fetch and return purge patient flag... ; returns the number of days to hold the patient record ; with no orders. Default is 30 ; Based on entry in PURGE PATIENT field in BCMA BACKUP ; PARAMETERS file (53.71) | |
| DEFOR() | ; fetch and return purge order flag... ; returns the number of day to hold a patient order after ; the Stop Date. Default is 7 ; Based on entry in PURGE ORDER DAYS field in BCMA BACKUP ; PARAMETERS file (53.71) | |
| MON(DAY) | ;Get the month | 
| Name | Line Occurrences | 
|---|---|
| Function Call: WRITE | 
 | 
| Name | Line Occurrences (* Changed, ! Killed) | 
|---|---|
| ^ALPB(53.7 - [#53.7] | LSTACT+8, LSTACT+9, LSTACT+11, LSTACT+12*, LACT+7, LACT+8, LACT+9 | 
| ^ALPB(53.71 - [#53.71] | DEFML+4, DEFOR+6, DEFPR+6 | 
| >> | Not killed explicitly | 
| * | Changed | 
| ! | Killed | 
| ~ | Newed | 
| Name | Field # of Occurrence | 
|---|---|
| >> %I(2 | START+3, MON+3, ARRAY+15 | 
| ALP | LSTACT+5~, LSTACT+8*, LSTACT+9, LACT+4~, LACT+8*, LACT+9 | 
| ALPDFN | LACT~, LACT+5, LACT+7, LACT+8, LACT+9 | 
| ALPDRUG | LACT~, LACT+6, LACT+7, LACT+8, LACT+9 | 
| >> CNT | START+8*, START+13*, START+17, START+18*, ARRAY+20*, ARRAY+25*, ARRAY+28 | 
| >> DA | LSTACT+11, LSTACT+12 | 
| >> DA(1 | LSTACT+8, LSTACT+9, LSTACT+11, LSTACT+12 | 
| >> DA(2 | LSTACT+8, LSTACT+9, LSTACT+11, LSTACT+12 | 
| DATA | LACT+4~, LACT+9*, LACT+10 | 
| DATE | LSTACT+5~, LSTACT+11*, LSTACT+12 | 
| DAY | START~, START+9, START+17, MON~, ARRAY~, ARRAY+21, ARRAY+28 | 
| DRUG | LSTACT+5~, LSTACT+9*, LSTACT+10, LSTACT+12 | 
| >> J | START+12*, START+14, START+15*, START+16, START+17*, START+19, ARRAY+24*, ARRAY+26*, ARRAY+27 | 
| >> LD | START+6*, START+7, MON+6*, ARRAY+18*, ARRAY+19 | 
| >> LDD | START+7*, START+10, START+11*, START+12, ARRAY+19*, ARRAY+22, ARRAY+23*, ARRAY+24 | 
| >> MON | START+5*, START+6, MON+5*, MON+6, ARRAY+17*, ARRAY+18, ARRAY+28 | 
| >> MONT( | ARRAY+28 | 
| >> MONT("APR" | ARRAY+4* | 
| >> MONT("AUG" | ARRAY+8* | 
| >> MONT("DEC" | ARRAY+12* | 
| >> MONT("FEB" | ARRAY+2* | 
| >> MONT("JAN" | ARRAY+1* | 
| >> MONT("JUL" | ARRAY+7* | 
| >> MONT("JUN" | ARRAY+6* | 
| >> MONT("MAR" | ARRAY+3* | 
| >> MONT("MAY" | ARRAY+5* | 
| >> MONT("NOV" | ARRAY+11* | 
| >> MONT("OCT" | ARRAY+10* | 
| >> MONT("SEP" | ARRAY+9* | 
| >> SP | START+8*, START+13*, START+14, START+18*, START+19, ARRAY+20*, ARRAY+25*, ARRAY+28 | 
| >> SS | START+9*, START+10*, START+11, START+16, ARRAY+21*, ARRAY+22*, ARRAY+23, ARRAY+27 | 
| >> STARD | START+3*, START+9, START+12, MON+3*, ARRAY+15*, ARRAY+21, ARRAY+24 | 
| U | DEFML+4, DEFOR+6, DEFPR+6, LSTACT+9, LSTACT+11 | 
| X | START+2, MON+2, ARRAY+14, DEFML+3~, DEFML+4*, DEFML+5, DEFOR+5~, DEFOR+6*, DEFOR+7, DEFPR+5~ , DEFPR+6*, DEFPR+7 | 
| >> Y | START+2*, START+5, MON+2*, MON+5, ARRAY+14*, ARRAY+17 |