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