Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACHSBUG3

ACHSBUG3.m

Go to the documentation of this file.
  1. ACHSBUG3 ; IHS/ITSC/PMF - EDIT MISSING AUTHORIZATION DATES ; [ 10/16/2001 8:16 AM ]
  1. ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
  1. ;
  1. ; - Check for missing 3-nodes and allow user to edit info.
  1. ;
  1. ; - A recurring bug deletes the 3-nodes, where the Beginning and
  1. ; Ending Authorization dates are kept. Current and previous
  1. ; developers have attempted to squash the bug, with no success.
  1. ;
  1. N ACHSDUZ2,ACHSERR,ACHSFLAG,ACHSMIS3,ACHSVIEW,D,L
  1. ;
  1. S ACHSVIEW=1,ACHSDUZ2=DUZ(2),(ACHSMIS3,L)=0
  1. D HELP("HELPC3")
  1. ;
  1. LOOP ;
  1. S ACHSFLAG=$$DIR^XBDIR("SO^S:Search;D:Select an Individual Document","","","","^D HELP^ACHSBUG3(""HELPC3"")",2)
  1. I ACHSFLAG="D" D SEL G LOOP
  1. I ACHSFLAG="S" D SEARCH G LOOP
  1. D EOJ
  1. Q
  1. ;
  1. F S L=$O(^ACHSF("B",L)) Q:'L!$D(DUOUT)!$D(DTOUT) S D=0 F S D=$O(^ACHSF(L,"D",D)) Q:'D!$D(DUOUT)!$D(DTOUT) W "." I '$D(^(D,3)) S ACHSMIS3=ACHSMIS3+1 D
  1. . I '$$SETENVRN(L) D DISPLAY(L,D),EDIT(L,D)
  1. ;
  1. Q
  1. ;
  1. EOJ ;
  1. W !,ACHSMIS3," documents processed."
  1. N ACHSDOIT
  1. S ACHSDOIT="S"_" DU"_"Z(2)="_ACHSDUZ2
  1. X ACHSDOIT
  1. D ^ACHSUF
  1. I $$DIR^XBDIR("E","Press RETURN...")
  1. Q
  1. ;
  1. SETENVRN(L) ;
  1. N ACHSDOIT
  1. S ACHSDOIT="S"_" DU"_"Z(2)="_L
  1. X ACHSDOIT
  1. K L
  1. N D
  1. D ^ACHSUF
  1. Q $G(ACHSERR)
  1. ;
  1. DISPLAY(L,D) ;
  1. N ACHSDOIT
  1. S ACHSDOIT="S"_" DU"_"Z(2)="_L
  1. X ACHSDOIT
  1. ;
  1. S ACHSDIEN=D,ACHSTIEN=1
  1. K ACHSSIG,D,L
  1. D INIT^ACHSRP2,^ACHSAV
  1. S ACHSADJ=""
  1. D A0A^ACHSUSC
  1. K ACHSADJ
  1. Q
  1. ;
  1. EDIT(L,D) ;
  1. N DA,DIE,DR
  1. S DIE="^ACHSF("_L_",""D"",",DA=D,DR="75;76"
  1. K D,L
  1. F D ^DIE Q:'$$DIR^XBDIR("Y","Edit again","N","","If you missed something, do you want to edit again (Y/N)","",1) D DISPLAY(+$P($P(DIE,"(",2),","),DA)
  1. Q
  1. ;
  1. SEL ;
  1. D ^ACHSUD
  1. Q:'$D(ACHSDIEN)
  1. D DISPLAY(DUZ(2),ACHSDIEN)
  1. I $P($G(^ACHSF(DUZ(2),"D",ACHSDIEN,3)),U,1) W !,*7,"AUTH BEGINNING DATE exists for this document." S X=$$DIR^XBDIR("E") Q:$D(DIRUT) G SEL
  1. D EDIT(DUZ(2),ACHSDIEN)
  1. Q
  1. ;
  1. HELPC3 ;EP
  1. ;;You have the option of [S]earching for PDO's with missing beginning
  1. ;;authorization dates, or selecting a particular [D]ocument. In either
  1. ;;case, the document will be displayed, and you will be given the
  1. ;;opportunity to edit both the AUTH BEGINNING DATE and the AUTH ENDING
  1. ;;DATE. The AUTH BEGINNING DATE field is required. You can skip the
  1. ;;document by hatting out ("^"). You will be given the opportunity
  1. ;;of editing the dates, again, before proceeding to the next document.
  1. ;;###
  1. ;
  1. HELP(L) ;EP - Display text at label L. Probably called from DIR.
  1. W !
  1. F %=1:1 W !?4,$P($T(@L+%),";",3) Q:$P($T(@L+%+1),";",3)="###"
  1. Q
  1. ;