Ignore:
Timestamp:
May 25, 2012, 5:55:11 PM (12 years ago)
Author:
Sam Habiel
Message:

Updated routines after many small fixes; added C0QKIDS as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qrda/C0Q/trunk/p/C0QIMMUN.m

    r1364 r1438  
    1 C0QIMMUN        ;Prep Immunization Order data for HL7 Message creation ;
    2         ;;0.1;C0Q;nopatch;noreleasedate;Build 27
     1C0QIMMUN        ;Prep Immunization Order data for HL7 Message creation ; 5/23/12 5:40pm
     2        ;;1.0;C0Q;;May 21, 2012;Build 43
    33        ;  ^XTMP("C0QIMMUN",0)=purge date^create date
    44        ;  ^XTMP("C0QIMMUN",order_date,order#,item_name)=item_value
    55        ;  ^XTMP("C0QIMMUN","LASTORDR")=last order processed
     6        ; Changed by VEN/SMH to add timeout to the locks on May 23 2012
    67FIND    ; Find the next set of immunization orders
    78        N X1,X2,X,%,%DT,%H,%T,NOW,ORDER,LASTORDR,SUBSC,DIR
    89        S LASTORDR=+$G(^XTMP("C0QIMMUN","LASTORDR"))
     10        N C0QFAIL S C0QFAIL=0 ; Lock fail flag
    911        W !,"The ""Last Order"" from which to begin checking for Immunization orders is: ",LASTORDR
    1012        S DIR("A")="Do you want to reset that value"
     
    1517        . D:Y>0
    1618        . . S LASTORDR=+Y
    17         . . L +^XTMP("C0QIMMUN")
     19        . . L +^XTMP("C0QIMMUN"):0
     20        . . E  S C0QFAIL=1 QUIT
    1821        . . S X1=DT,X2=365 D C^%DTC
    1922        . . S ^XTMP("C0QIMMUN",0)=X_U_DT
     
    2225        . . Q
    2326        . Q
     27        I C0QFAIL W !,"Failed to acquire lock, exiting..." QUIT
    2428        S DIR("A")="Ready to prep more immunization orders for HL7 messages"
    2529        S DIR(0)="Y",DIR("B")="YES" D ^DIR Q:Y'=1
    26         L +^XTMP("C0QIMMUN")
     30        L +^XTMP("C0QIMMUN"):0
     31        E  W !,"Failed to acquire lock; exiting..." QUIT
    2732        I '$D(^XTMP("C0QIMMUN",0)) D
    2833        . S X1=DT,X2=365 D C^%DTC
Note: See TracChangeset for help on using the changeset viewer.