Changeset 636 for FOIAVistA/tag/r/CLINICAL_REMINDERS-PXRM/PXRMEXCF.m
- Timestamp:
- Dec 4, 2009, 8:26:01 PM (14 years ago)
- 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/20072 ;;2.0;CLINICAL REMINDERS; **6**;Feb 04, 2005;Build 1231 PXRMEXCF ; SLC/PKR - Reminder exchange routines for computed findings. ;12/22/2004 2 ;;2.0;CLINICAL REMINDERS;;Feb 04, 2005 3 3 ;============================================== 4 4 EXISTS(ROUTINE) ;Return true if routine ROUTINE exists. … … 10 10 ;============================================== 11 11 GETRACT(ATTR,NEWNAME,NAMECHG,RTN,EXISTS) ;Get the action for a routine. 12 N ACTION,CHOICES, CSUM,DIR,DIROUT,DIRUT,DTOUT,DUOUT,ECS,IND,MSG12 N ACTION,CHOICES,DIR,DIROUT,DIRUT,DTOUT,DUOUT,ECS,IND,MSG 13 13 N PCS,ROUTINE,SAME,TEXT,X,Y 14 14 S NEWNAME="" 15 ;If the routine exists compare the existing routine checksum with the 16 ;the checksum of the routine in the packed definition. 15 17 S ROUTINE=ATTR("NAME") 16 18 I EXISTS="" S EXISTS=$$EXISTS^PXRMEXCF(ROUTINE) 17 19 S CHOICES=$S(EXISTS:"COQS",1:"CIQS") 18 20 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) 23 22 . 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) 34 29 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?" 36 31 . S DIR("B")="I" 37 32 . S ACTION=$$GETACT^PXRMEXIU(CHOICES,.DIR) 38 33 ; 39 I (ACTION="Q")!(ACTION="S")Q ACTION34 I ACTION="Q" Q ACTION 40 35 ; 41 36 I ACTION="C" D … … 65 60 Q ACTION 66 61 ; 62 ;============================================== 63 SAME(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.