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

MCNMDUP.m

Go to the documentation of this file.
  1. MCNMDUP ;WISC/RMP,DAD-Duplicate "NM" node routine for Medicine ;4/22/96 12:19
  1. ;;2.3;Medicine;;09/13/1996
  1. CHECK(COUNT) ;
  1. N X,XX,FILE,FIELD,ROOT,FROOT,HOLD,TEMP
  1. S COUNT=0
  1. F FILE=691.6,691.8,691.9,692,694,699,700 D
  1. . S X=$P(^DD(FILE,0),U)
  1. . I X'="FIELD" Q
  1. . S ROOT=$J(FILE,1,2),FROOT=FILE
  1. . F FIELD=0:0 S FIELD=$O(^DD(FILE,FIELD)) Q:'FIELD D FIELD
  1. . Q
  1. I COUNT>0 D
  1. . F TEMP=1:1 S HOLD=$P($T(NOTE+TEMP),";;",2) Q:HOLD="" W !,HOLD,!
  1. . Q
  1. Q ;COUNT
  1. FIELD S XX=+$P(^DD(FILE,FIELD,0),U,2)
  1. I XX D
  1. . D NMCHK(XX)
  1. . N FIELD,FILE,SFILE S (FILE,SFILE)=XX
  1. . F FIELD=0:0 S FIELD=$O(^DD(SFILE,FIELD)) Q:'FIELD D FIELD
  1. . Q
  1. Q
  1. NMCHK(NMFILE) ;
  1. N SUBNAME,XTRANAME
  1. S SUBNAME="",SUBNAME=$O(^DD(NMFILE,0,"NM",SUBNAME)) Q:SUBNAME=""
  1. S XTRANAME=$O(^DD(NMFILE,0,"NM",SUBNAME))
  1. I $L(XTRANAME)>0 D
  1. . W !,"Duplicate NM Node in file: ",NMFILE,$$MAINF(NMFILE)
  1. . S COUNT=COUNT+1
  1. . Q
  1. Q
  1. MAINF(SFILE) ;
  1. Q $S(SFILE=FILE:"",1:" subfile of: "_FILE)
  1. NOTE ;
  1. ;;The finding of duplicate "NM" nodes within the subfiles of
  1. ;;the above listed main files is a direct result of the some of
  1. ;;the reorganization which has occurred between versions of the
  1. ;;Medicine Package.
  1. ;;1) It is necessary at this time for you to record the main files
  1. ;; listed above for FM Data Dictionary repairs.
  1. ;;2) From programmer mode enter FM and select DATA DICTIONARY UTILITIES.
  1. ;;3) Select the CHECK/FIX DD STRUCTURE option and submit each of the
  1. ;;4)Then restart the Medicine Installation from the ^MCARINS step.
  1. ;;