Ignore:
Timestamp:
Dec 4, 2009, 8:26:01 PM (14 years ago)
Author:
George Lilly
Message:

WorldVistAEHR overlayed on FOIAVistA

Location:
FOIAVistA/tag/r
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMEXCF.m

    r628 r636  
    1 PXRMEXCF ; SLC/PKR - Reminder exchange routines for computed findings. ;06/28/2007
    2  ;;2.0;CLINICAL REMINDERS;**6**;Feb 04, 2005;Build 123
     1PXRMEXCF ; SLC/PKR - Reminder exchange routines for computed findings. ;12/22/2004
     2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005
    33 ;==============================================
    44EXISTS(ROUTINE) ;Return true if routine ROUTINE exists.
     
    1010 ;==============================================
    1111GETRACT(ATTR,NEWNAME,NAMECHG,RTN,EXISTS) ;Get the action for a routine.
    12  N ACTION,CHOICES,CSUM,DIR,DIROUT,DIRUT,DTOUT,DUOUT,ECS,IND,MSG
     12 N ACTION,CHOICES,DIR,DIROUT,DIRUT,DTOUT,DUOUT,ECS,IND,MSG
    1313 N PCS,ROUTINE,SAME,TEXT,X,Y
    1414 S NEWNAME=""
     15 ;If the routine exists compare the existing routine checksum with the
     16 ;the checksum of the routine in the packed definition.
    1517 S ROUTINE=ATTR("NAME")
    1618 I EXISTS="" S EXISTS=$$EXISTS^PXRMEXCF(ROUTINE)
    1719 S CHOICES=$S(EXISTS:"COQS",1:"CIQS")
    1820 I EXISTS D
    19  .;If the routine exists compare the existing routine checksum with the
    20  .;the checksum of the routine in the packed definition.
    21  . S CSUM=$$RTNCS^PXRMEXCS(ROUTINE)
    22  . S SAME=$S(ATTR("CHECKSUM")=CSUM:1,1:0)
     21 . S SAME=$$SAME(.ATTR,.RTN)
    2322 . S TEXT(1)="Routine "_ROUTINE_" already exists "
    24  . I SAME D
    25  .. S TEXT(1)=TEXT(1)_"and the packed routine is identical, skipping."
    26  .. W !,TEXT(1),! H 2
    27  .. S ACTION="S"
    28  . I 'SAME D
    29  .. S TEXT(1)=TEXT(1)_"but the packed routine is different,"
    30  .. S TEXT(2)="what do you want to do?"
    31  .. W !,TEXT(1),!,TEXT(2)
    32  .. S DIR("B")="O"
    33  .. S ACTION=$$GETACT^PXRMEXIU(CHOICES,.DIR)
     23 . I SAME S TEXT(1)=TEXT(1)_"and the packed routine is identical,"
     24 . I 'SAME S TEXT(1)=TEXT(1)_"but the packed routine is different,"
     25 . S TEXT(2)="what do you want to do?"
     26 . D EN^DDIOL(.TEXT)
     27 . S DIR("B")="S"
     28 . S ACTION=$$GETACT^PXRMEXIU(CHOICES,.DIR)
    3429 E  D
    35  . W !!,"Routine "_ROUTINE_" is new, what do you want to do?"
     30 . W !!,"Routine "_ROUTINE_" is NEW, what do you want to do?"
    3631 . S DIR("B")="I"
    3732 . S ACTION=$$GETACT^PXRMEXIU(CHOICES,.DIR)
    3833 ;
    39  I (ACTION="Q")!(ACTION="S") Q ACTION
     34 I ACTION="Q" Q ACTION
    4035 ;
    4136 I ACTION="C" D
     
    6560 Q ACTION
    6661 ;
     62 ;==============================================
     63SAME(ATTR,RTN) ;Compare the existing routine and the new version
     64 ;in RTN to see if they are the same.
     65 N ECS,DIF,NEWCS,RT,SAME,X,XCNP
     66 ;Load the existing routine into RT.
     67 S XCNP=0
     68 S DIF="RT("
     69 S X=ATTR("NAME")
     70 X ^%ZOSF("LOAD")
     71 S ECS=$$ROUTINE^PXRMEXCS(.RT)
     72 K RT
     73 S NEWCS=$$ROUTINE^PXRMEXCS(.RTN)
     74 S SAME=$S(ECS=NEWCS:1,1:0)
     75 Q SAME
     76 ;
Note: See TracChangeset for help on using the changeset viewer.