- ECTPLNK ; B'ham ISC/DMA -Link File 49 Entries to National File ;01/29/91 08:00
- V ;;1.05;INTERIM MANAGEMENT SUPPORT;;
- ;SELECT ENTER/EDIT CHOICE
- CHS W !!,"At this time, you may:",!!,"1. List the Entries in File 49",!,"2. Link an Entry from File 49 to an Entry in the National Service File",!,"3. Print Error Checking Reports",!!,"Select a number (1 -3): "
- R CHS:DTIME G:'$T!("^"[CHS) END I CHS'?1N!(CHS<1)!(CHS>3) W !!,*7,"You MUST answer with a number between 1 and 3." G CHS
- ;BRANCH BASED ON ENTER/EDIT CHOICE
- I CHS=1 D 49 G END
- I CHS=3 D REPORTS Q
- ;
- LOC W ! S DIC=49,DIC(0)="QEAMZ",DIC("A")="Select File 49 Entry: " D ^DIC K DIC G END:Y<0 S DA=+Y
- I $P(Y(0),"^",4),$P(Y(0),"^",4)'=DA W !,$P(Y,"^",2)," has been identified as a section of ",$P(^DIC(49,$P(Y(0),"^",4),0),"^")," Service",!,"And should not be linked to a National Service" G LOC
- S DIE=49,DR=730 D ^DIE K DR,DIE,DA G LOC
- ;
- END K %,%Y,BY,C,CHS,D0,DHD,DI,DISYS,DQ,FLDS,FR,L,P,POP,TO,X,Y Q
- ;
- REPORTS ; reports of problems with file 730, file 49 and links
- ;1. National service active but no local service
- ;2. Local service with no national service
- ;3. Local service or section set for DMMS with no national service
- ;
- W !,"This report will generate three lists of potential problems",!,"found with entries in the National Service File and",!,"connections between that file and the local Service/Section File.",!
- DEV S %ZIS="Q",%ZIS("B")="",%ZIS("A")="Select printer for report : " D ^%ZIS K %ZIS G END:POP I $E(IOST)'="P" W !,"Please select a printer." D ^%ZISC G DEV
- I $D(IO("Q")) S ZTRTN="DEQ^ECTPLNK" D ^%ZTLOAD K ZTRTN G END
- ;
- DEQ ;entry to print reports
- U IO W:$Y @IOF W !!,"POTENTIAL PROBLEMS WITH NATIONAL SERVICE FILE",!
- W !!,"REPORT ONE OF THREE",!,"These entries in the National Service File have been identified",!,"as active at your station, but are not associated with a",!,"Service/Section File entry.",!!
- W !,"Use the 'Link File 49 Entries to National File' option",!,"to associate a service/section with these national services."
- W !,"OR",!,"Use the 'Identify Local Services from National File' option",!,"to edit/mark these services as not locally active.",!!
- S OK=1,SER="" F J=0:0 S SER=$O(^ECC(730,"B",SER)) Q:SER="" F J=0:0 S J=$O(^ECC(730,"B",SER,J)) Q:'J S SERP=^ECC(730,J,0) I $P(^(0),"^",3),'$D(^DIC(49,"A1",J)) S OK=0 W !,?5,$P(SERP,"^") W:$Y+4>IOSL @IOF,!!
- I OK W !!,"NO PROBLEMS FOUND"
- W @IOF,!!,"REPORT TWO OF THREE",!!,"These entries in your Service/Section File appear to be services",!,"but are not associated with a National Service.",!
- W !,"Use the 'Link File 49 Entries to National File' option",!,"to associate them with a National Service.",!!
- S OK=1,SER="" F J=0:0 S SER=$O(^DIC(49,"B",SER)) Q:SER="" F J=0:0 S J=$O(^DIC(49,"B",SER,J)) Q:'J S SERP=^DIC(49,J,0) I '$P(SERP,"^",4),'$D(^DIC(49,"A2",J)) S OK=0 W !,?5,$P(SERP,"^") W:$Y+4>IOSL @IOF,!!
- I OK W !,"NO PROBLEMS FOUND"
- W @IOF,!!,"REPORT THREE OF THREE",!!,"These services or sections in your Service/Section File",!,"have been flagged for use with Event Capture but have not been",!,"associated with a National Service."
- W !!,"Use the 'Identify Local Services from National File' option",!,"to link these services with a National Service.",!!
- S OK=1,SER="" F J=0:0 S SER=$O(^DIC(49,"B",SER)) Q:SER="" F J=0:0 S J=$O(^DIC(49,"B",SER,J)) Q:'J S SERP=^DIC(49,J,0),SERV=$P(SERP,"^",4) S:'SERV SERV=J I $D(^DIC(49,J,"EC")),^("EC")]"",'$D(^DIC(49,"A2",J)) S OK=0 W !,?5,$P(SERP,"^") D SERSEC
- I OK W !,"NO PROBLEMS FOUND"
- W @IOF K J,OK,SER,SERP,SERV D ^%ZISC G END
- ;
- SERSEC W ?40," ",$S(SERV=J:"(section)",1:"(service)") W:$Y+4>IOSL @IOF,!! Q
- ;
- 49 ;List entries in 49
- W !,"This report will print a list of local services and sections",!,"found in the 'Service/Section' file #49.",!
- S L=0,DIC=49,FLDS=".01;""FILE ENTRIES""",BY=.01,FR="",TO="zz",DHD="FILE 49 - SERVICE/SECTION REPORT" D EN1^DIP
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECTPLNK 3936 printed Feb 18, 2025@23:29:05 Page 2
- ECTPLNK ; B'ham ISC/DMA -Link File 49 Entries to National File ;01/29/91 08:00
- V ;;1.05;INTERIM MANAGEMENT SUPPORT;;
- +1 ;SELECT ENTER/EDIT CHOICE
- CHS WRITE !!,"At this time, you may:",!!,"1. List the Entries in File 49",!,"2. Link an Entry from File 49 to an Entry in the National Service File",!,"3. Print Error Checking Reports",!!,"Select a number (1 -3): "
- +1 READ CHS:DTIME
- if '$TEST!("^"[CHS)
- GOTO END
- IF CHS'?1N!(CHS<1)!(CHS>3)
- WRITE !!,*7,"You MUST answer with a number between 1 and 3."
- GOTO CHS
- +2 ;BRANCH BASED ON ENTER/EDIT CHOICE
- +3 IF CHS=1
- DO 49
- GOTO END
- +4 IF CHS=3
- DO REPORTS
- QUIT
- +5 ;
- LOC WRITE !
- SET DIC=49
- SET DIC(0)="QEAMZ"
- SET DIC("A")="Select File 49 Entry: "
- DO ^DIC
- KILL DIC
- if Y<0
- GOTO END
- SET DA=+Y
- +1 IF $PIECE(Y(0),"^",4)
- IF $PIECE(Y(0),"^",4)'=DA
- WRITE !,$PIECE(Y,"^",2)," has been identified as a section of ",$PIECE(^DIC(49,$PIECE(Y(0),"^",4),0),"^")," Service",!,"And should not be linked to a National Service"
- GOTO LOC
- +2 SET DIE=49
- SET DR=730
- DO ^DIE
- KILL DR,DIE,DA
- GOTO LOC
- +3 ;
- END KILL %,%Y,BY,C,CHS,D0,DHD,DI,DISYS,DQ,FLDS,FR,L,P,POP,TO,X,Y
- QUIT
- +1 ;
- REPORTS ; reports of problems with file 730, file 49 and links
- +1 ;1. National service active but no local service
- +2 ;2. Local service with no national service
- +3 ;3. Local service or section set for DMMS with no national service
- +4 ;
- +5 WRITE !,"This report will generate three lists of potential problems",!,"found with entries in the National Service File and",!,"connections between that file and the local Service/Section File.",!
- DEV SET %ZIS="Q"
- SET %ZIS("B")=""
- SET %ZIS("A")="Select printer for report : "
- DO ^%ZIS
- KILL %ZIS
- if POP
- GOTO END
- IF $EXTRACT(IOST)'="P"
- WRITE !,"Please select a printer."
- DO ^%ZISC
- GOTO DEV
- +1 IF $DATA(IO("Q"))
- SET ZTRTN="DEQ^ECTPLNK"
- DO ^%ZTLOAD
- KILL ZTRTN
- GOTO END
- +2 ;
- DEQ ;entry to print reports
- +1 USE IO
- if $Y
- WRITE @IOF
- WRITE !!,"POTENTIAL PROBLEMS WITH NATIONAL SERVICE FILE",!
- +2 WRITE !!,"REPORT ONE OF THREE",!,"These entries in the National Service File have been identified",!,"as active at your station, but are not associated with a",!,"Service/Section File entry.",!!
- +3 WRITE !,"Use the 'Link File 49 Entries to National File' option",!,"to associate a service/section with these national services."
- +4 WRITE !,"OR",!,"Use the 'Identify Local Services from National File' option",!,"to edit/mark these services as not locally active.",!!
- +5 SET OK=1
- SET SER=""
- FOR J=0:0
- SET SER=$ORDER(^ECC(730,"B",SER))
- if SER=""
- QUIT
- FOR J=0:0
- SET J=$ORDER(^ECC(730,"B",SER,J))
- if 'J
- QUIT
- SET SERP=^ECC(730,J,0)
- IF $PIECE(^(0),"^",3)
- IF '$DATA(^DIC(49,"A1",J))
- SET OK=0
- WRITE !,?5,$PIECE(SERP,"^")
- if $Y+4>IOSL
- WRITE @IOF,!!
- +6 IF OK
- WRITE !!,"NO PROBLEMS FOUND"
- +7 WRITE @IOF,!!,"REPORT TWO OF THREE",!!,"These entries in your Service/Section File appear to be services",!,"but are not associated with a National Service.",!
- +8 WRITE !,"Use the 'Link File 49 Entries to National File' option",!,"to associate them with a National Service.",!!
- +9 SET OK=1
- SET SER=""
- FOR J=0:0
- SET SER=$ORDER(^DIC(49,"B",SER))
- if SER=""
- QUIT
- FOR J=0:0
- SET J=$ORDER(^DIC(49,"B",SER,J))
- if 'J
- QUIT
- SET SERP=^DIC(49,J,0)
- IF '$PIECE(SERP,"^",4)
- IF '$DATA(^DIC(49,"A2",J))
- SET OK=0
- WRITE !,?5,$PIECE(SERP,"^")
- if $Y+4>IOSL
- WRITE @IOF,!!
- +10 IF OK
- WRITE !,"NO PROBLEMS FOUND"
- +11 WRITE @IOF,!!,"REPORT THREE OF THREE",!!,"These services or sections in your Service/Section File",!,"have been flagged for use with Event Capture but have not been",!,"associated with a National Service."
- +12 WRITE !!,"Use the 'Identify Local Services from National File' option",!,"to link these services with a National Service.",!!
- +13 SET OK=1
- SET SER=""
- FOR J=0:0
- SET SER=$ORDER(^DIC(49,"B",SER))
- if SER=""
- QUIT
- FOR J=0:0
- SET J=$ORDER(^DIC(49,"B",SER,J))
- if 'J
- QUIT
- SET SERP=^DIC(49,J,0)
- SET SERV=$PIECE(SERP,"^",4)
- if 'SERV
- SET SERV=J
- IF $DATA(^DIC(49,J,"EC"))
- IF ^("EC")]""
- IF '$DATA(^DIC(49,"A2",J))
- SET OK=0
- WRITE !,?5,$PIECE(SERP,"^")
- DO SERSEC
- +14 IF OK
- WRITE !,"NO PROBLEMS FOUND"
- +15 WRITE @IOF
- KILL J,OK,SER,SERP,SERV
- DO ^%ZISC
- GOTO END
- +16 ;
- SERSEC WRITE ?40," ",$SELECT(SERV=J:"(section)",1:"(service)")
- if $Y+4>IOSL
- WRITE @IOF,!!
- QUIT
- +1 ;
- 49 ;List entries in 49
- +1 WRITE !,"This report will print a list of local services and sections",!,"found in the 'Service/Section' file #49.",!
- +2 SET L=0
- SET DIC=49
- SET FLDS=".01;""FILE ENTRIES"""
- SET BY=.01
- SET FR=""
- SET TO="zz"
- SET DHD="FILE 49 - SERVICE/SECTION REPORT"
- DO EN1^DIP
- +3 QUIT