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

ORRCOA.m

Go to the documentation of this file.
  1. ORRCOA ;SLC/JMH - ORDER ACKNOWLEDGMENT QUERY UTILITY ; ; Compiled January 31, 2006 09:47:02
  1. ;;1.0;CARE MANAGEMENT;**5**;Jul 15, 2003;Build 4
  1. ;
  1. ;
  1. INQBYORD ;
  1. N NUM,DIR,X,Y,LIST
  1. S NUM=1,LIST=""
  1. W !!
  1. W "This option searches the ORDER ACKNOWLEDGMENT file for entries related to a"
  1. W !," specific order. This can be used to help determine if a provider"
  1. W !," has already acknowledged an order or not."
  1. W !!
  1. S DIR(0)="NO",DIR("A")="Enter an Order Number: "
  1. S X="" F D ^DIR Q:'X!(X="^") D
  1. .N IEN
  1. .S IEN=$O(^ORA(102.4,"B",X,0))
  1. .I 'IEN W !!,"There are no records in the ORDER ACKNOWLEDGMENT file that point to this ",!,"order number." Q
  1. .S LIST(IEN)=""
  1. Q:X="^"
  1. I $D(LIST)'=11 W !!,"No records have been chosen for inclusion in the report." Q
  1. D PRINTLST(.LIST,NUM)
  1. Q
  1. ;
  1. INQBYPRO ;
  1. N I,J,NUM,LIST,DIC,X,Y,DIR,PROV,START,END
  1. S NUM=2,LIST="",START=0,END=9999999
  1. W !!
  1. W "This option searches the ORDER ACKNOWLEDGMENT file for un-acknowledged orders"
  1. W !," only by provider. This can be used to help a provider identify those"
  1. W !," orders that s/he still needs to take care of."
  1. W !," Orders that have already been acknowledged will NOT show up here."
  1. W !!
  1. S DIC="^VA(200,",DIC(0)="AEQZ" D ^DIC
  1. I 'Y Q
  1. S PROV=Y
  1. S I=0 F S I=$O(^ORA(102.4,"ACK",+PROV,I)) Q:'I D
  1. .S J=0 F S J=$O(^ORA(102.4,"ACK",+PROV,I,J)) Q:'J D
  1. ..S LIST(J)=""
  1. I $D(LIST)'=11 W !!,"No records have been chosen for inclusion in the report." Q
  1. D PRINTLST(.LIST,NUM)
  1. Q
  1. ;
  1. PRINTREC(IEN) ;
  1. N ORDER,PROV,ACKDT
  1. S ORDER=+$G(^ORA(102.4,IEN,0))
  1. S PROV=$P($G(^ORA(102.4,IEN,0)),U,2)
  1. S PROV=$P($G(^VA(200,PROV,0)),U)
  1. S ACKDT=$$FMTE^XLFDT($P($G(^ORA(102.4,IEN,0)),U,3))
  1. I $G(ORDER) W !!,"ORDER: ",ORDER,?35,"PROVIDER: ",PROV
  1. I $L($G(ACKDT)) W !,?10,"ACKNOWLEDGEMENT DATE/TIME: ",ACKDT
  1. Q
  1. ;
  1. PRINTLST(LIST,NUM) ;
  1. N %ZIS
  1. S %ZIS="M" D ^%ZIS U IO
  1. N I,ORRCQ
  1. S ORRCQ=0
  1. Q:'$D(LIST)
  1. W @IOF
  1. D HDR(NUM)
  1. S I=0 F S I=$O(LIST(I)) Q:'I!(ORRCQ) D
  1. .D PRINTREC(I)
  1. .I $Y>(IOSL-3)&(IOST["C-") S ORRCQ='$$PAUSE() D
  1. ..Q:ORRCQ
  1. ..W @IOF
  1. ..D HDR(NUM)
  1. W !,"_________________________________________________",!!
  1. I ORRCQ W !,"Exiting report before complete..."
  1. I 'ORRCQ W !,"End of report."
  1. D ^%ZISC
  1. Q
  1. HDR(NUM) ;
  1. I NUM=1 D
  1. . W !,"Listing of ORDER ACKNOWLEDGEMENTS by order number"
  1. . W !,"================================================="
  1. I NUM=2 D
  1. . W !,"Listing of ORDER ACKNOWLEDGMENTES by Provider"
  1. . W !,"============================================="
  1. Q 0
  1. PAUSE() ;
  1. N DIR,X,Y,DTOUT,DUOUT,DIRUT
  1. S DIR(0)="E"
  1. D ^DIR
  1. Q $S(Y'=1:0,1:1)