- ONCOANCQ ;Hines OIFO/GWB - [ER Report of accessions requiring additional input] ;06/14/00
- ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
- ;
- S AASTYPNC="A"
- LINE N AASAY
- N READY
- F D Q:READY
- .S READY=0
- .I '$$SITEPAR^ONCOU("ERRMSG") S READY=-1
- .E I '$$GETDATA S READY=-1
- .E S READY=$$DEFOK
- .I 'READY W !!!?10,"OK, restarting from the beginning...",!!!
- I READY>0 D ^ONCOANC0
- Q
- ;
- GETDATA() ;Get data
- N ALLOK
- S AASAY=0,ALLOK=$$GETYEAR(.AASAY)
- I ALLOK D STATE S:'$D(BYR("B")) BYR("B")=(200+EYR)_"0000" S:'$D(BYR("E")) BYR("E")=(201+EYR)_"0000"
- I ALLOK S AASDXH=0,ALLOK=$$GETDXH(.AASDXH)
- Q ALLOK
- ;
- SHOINST() ;Display instructions
- N OKSHO,OKHERE S OKHERE=1
- S OKSHO=$$ASKY^ONCOU(" DISPLAY/PRINT on-line instructions for Help")
- I $D(DIRUT)!$D(DIROUT) S OKHERE=0
- E I OKSHO,'($D(ONCOREP)!$D(ONCOREQ)) S OKHERE=$$SHOWEM
- E I OKSHO,($D(ONCOREP)!$D(ONCOREQ)) D TEMPHLP
- Q OKHERE
- ;
- TEMPHLP N X,DIWL,DIWR,DIWF
- S DIWL=10,DIWR=70,DIWF="W"
- W !!
- I $D(ONCOREQ) D
- .S X="This report displays incomplete records for data to be transmitted to the ACOS, for a time period specified. The report does not specify exactly where in the database to fix problems. It is intended only as an aid."
- E D
- .S X="This report will display what will be transmitted on the ACOS disk. It is intended as an aid in correcting and validating the ACOS data. There is no extensive help for this report at this time."
- D ^DIWP,^DIWW W !
- Q
- ;
- SHOWEM() ;Instruction display
- N OKHERE
- W !! S DIC="^ONCO(160.2,",L=0,DHD="@"
- I AASTYPNC="A" S BY="[ONCO ACOS DOCUMENTATION]",DA=4
- I AASTYPNC="I" S FLDS="1",FR="PRIMARY ACOS INFO (850)",TO="STATE REPORTING ACOS INFOA",BY="@.01"
- D EN1^DIP
- S OKHERE=($D(DTOUT)+$D(DUOUT)=0)
- I 'OKHERE S OKHERE=$$ASKY^ONCOU("Continue")
- Q OKHERE
- ;
- GETYEAR(YR) ;Get year
- N OKHERE
- S BYR=1980,EYR=(1700+$E(DT,1,3))-1
- S:AASTYPNC'="A" YR=$$ASKNUM^ONCOU(" Select YEAR for ACOS Call for Data",BYR_":"_(BYR+20),EYR)
- I AASTYPNC="A" S YR=$$ASKNUM^ONCOU(" Select Accession Year",BYR_":"_(EYR),EYR)
- S OKHERE=($D(DTOUT)+$D(DUOUT)=0)
- Q OKHERE
- ;
- GETDXH(DXH) ;Get INSTITUTION ID NUMBER (160.1,27)
- N OKHERE
- S DIE=160.1
- S DA=$O(^ONCO(160.1,"C",DUZ(2),0))
- I DA="" S DA=$O(^ONCO(160.1,0))
- S DR=27_$J("",20)_"ACOS Number"
- S ONCOL=0
- L +^ONCO(160.1,DA):0 I $T D ^DIE L -^ONCO(160.1,DA) S ONCOL=1
- I 'ONCOL W !,"The site paramaters record is being edited by another user."
- K ONCOL
- K DIE S DXH=X
- S OKHERE=($D(Y)=0) ;Y is defined if user answered all prompts
- Q OKHERE
- ;
- DEFOK() ;Confirm definitions
- N OKHERE
- S OSP=$O(^ONCO(160.1,"C",DUZ(2),0))
- I OSP="" S OSP=$O(^ONCO(160.1,0))
- S AC=$P(^ONCO(160.1,OSP,1),U,4)
- S AC=$$GET1^DIQ(160.19,AC,.01,"I")
- K OSP
- W !!!?20,"ACOS Number is ",$S(AC'="":AC,1:"NOT defined in Site Parameters File") S:AC'="" AASDXH=AC
- W:AASTYPNC="I" !?20,"Year for ACOS data is ",AASAY
- I AASTYPNC="A" W !?20,"Accession Year ",AASAY,!?20,"Abstract Completed Date, Start is ",BYR("BY"),!?20,"Abstract Completed Date, End is ",BYR("BE")
- W ! S OKHERE=$$ASKY^ONCOU(" Definitions OK")
- Q OKHERE
- REPORT ;Set variable for report to run instead of tape
- N ONCOREP
- S ONCOREP=1,AASTYPNC="I" D LINE^ONCOANCQ,CLEANUP^ONCOANC9 Q
- ;
- REQREP ;Set variable for required field report to run
- N ONCOREQ
- S ONCOREQ=1 D ^ONCOANCQ,CLEANUP^ONCOANC9 Q
- ;
- STATE ;Identifies desired date range for state data collection disk
- Q:AASTYPNC'="A" I AASAY'>1 S ALLOK=0 Q
- S DIR(0)="D",DIR("A")=" Abstract Completed Date, Start"
- S DIR("B")="Jan 1, "_AASAY D ^DIR K DIR("B") I $D(DIRUT) S ALLOK=0 Q
- S BYR("B")=Y X ^DD("DD") W " ",Y S BYR("BY")=Y
- S DIR("A")=" Abstract Completed Date, End",DIR("B")="Dec 31, "_AASAY
- D ^DIR I $D(DIRUT) S ALLOK=0 Q
- S BYR("E")=Y X ^DD("DD") W " ",Y S BYR("BE")=Y
- K DIR
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOANCQ 3839 printed Mar 13, 2025@21:29:14 Page 2
- ONCOANCQ ;Hines OIFO/GWB - [ER Report of accessions requiring additional input] ;06/14/00
- +1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
- +2 ;
- +3 SET AASTYPNC="A"
- LINE NEW AASAY
- +1 NEW READY
- +2 FOR
- Begin DoDot:1
- +3 SET READY=0
- +4 IF '$$SITEPAR^ONCOU("ERRMSG")
- SET READY=-1
- +5 IF '$TEST
- IF '$$GETDATA
- SET READY=-1
- +6 IF '$TEST
- SET READY=$$DEFOK
- +7 IF 'READY
- WRITE !!!?10,"OK, restarting from the beginning...",!!!
- End DoDot:1
- if READY
- QUIT
- +8 IF READY>0
- DO ^ONCOANC0
- +9 QUIT
- +10 ;
- GETDATA() ;Get data
- +1 NEW ALLOK
- +2 SET AASAY=0
- SET ALLOK=$$GETYEAR(.AASAY)
- +3 IF ALLOK
- DO STATE
- if '$DATA(BYR("B"))
- SET BYR("B")=(200+EYR)_"0000"
- if '$DATA(BYR("E"))
- SET BYR("E")=(201+EYR)_"0000"
- +4 IF ALLOK
- SET AASDXH=0
- SET ALLOK=$$GETDXH(.AASDXH)
- +5 QUIT ALLOK
- +6 ;
- SHOINST() ;Display instructions
- +1 NEW OKSHO,OKHERE
- SET OKHERE=1
- +2 SET OKSHO=$$ASKY^ONCOU(" DISPLAY/PRINT on-line instructions for Help")
- +3 IF $DATA(DIRUT)!$DATA(DIROUT)
- SET OKHERE=0
- +4 IF '$TEST
- IF OKSHO
- IF '($DATA(ONCOREP)!$DATA(ONCOREQ))
- SET OKHERE=$$SHOWEM
- +5 IF '$TEST
- IF OKSHO
- IF ($DATA(ONCOREP)!$DATA(ONCOREQ))
- DO TEMPHLP
- +6 QUIT OKHERE
- +7 ;
- TEMPHLP NEW X,DIWL,DIWR,DIWF
- +1 SET DIWL=10
- SET DIWR=70
- SET DIWF="W"
- +2 WRITE !!
- +3 IF $DATA(ONCOREQ)
- Begin DoDot:1
- +4 SET X="This report displays incomplete records for data to be transmitted to the ACOS, for a time period specified. The report does not specify exactly where in the database to fix problems. It is intended only as an aid."
- End DoDot:1
- +5 IF '$TEST
- Begin DoDot:1
- +6 SET X="This report will display what will be transmitted on the ACOS disk. It is intended as an aid in correcting and validating the ACOS data. There is no extensive help for this report at this time."
- End DoDot:1
- +7 DO ^DIWP
- DO ^DIWW
- WRITE !
- +8 QUIT
- +9 ;
- SHOWEM() ;Instruction display
- +1 NEW OKHERE
- +2 WRITE !!
- SET DIC="^ONCO(160.2,"
- SET L=0
- SET DHD="@"
- +3 IF AASTYPNC="A"
- SET BY="[ONCO ACOS DOCUMENTATION]"
- SET DA=4
- +4 IF AASTYPNC="I"
- SET FLDS="1"
- SET FR="PRIMARY ACOS INFO (850)"
- SET TO="STATE REPORTING ACOS INFOA"
- SET BY="@.01"
- +5 DO EN1^DIP
- +6 SET OKHERE=($DATA(DTOUT)+$DATA(DUOUT)=0)
- +7 IF 'OKHERE
- SET OKHERE=$$ASKY^ONCOU("Continue")
- +8 QUIT OKHERE
- +9 ;
- GETYEAR(YR) ;Get year
- +1 NEW OKHERE
- +2 SET BYR=1980
- SET EYR=(1700+$EXTRACT(DT,1,3))-1
- +3 if AASTYPNC'="A"
- SET YR=$$ASKNUM^ONCOU(" Select YEAR for ACOS Call for Data",BYR_":"_(BYR+20),EYR)
- +4 IF AASTYPNC="A"
- SET YR=$$ASKNUM^ONCOU(" Select Accession Year",BYR_":"_(EYR),EYR)
- +5 SET OKHERE=($DATA(DTOUT)+$DATA(DUOUT)=0)
- +6 QUIT OKHERE
- +7 ;
- GETDXH(DXH) ;Get INSTITUTION ID NUMBER (160.1,27)
- +1 NEW OKHERE
- +2 SET DIE=160.1
- +3 SET DA=$ORDER(^ONCO(160.1,"C",DUZ(2),0))
- +4 IF DA=""
- SET DA=$ORDER(^ONCO(160.1,0))
- +5 SET DR=27_$JUSTIFY("",20)_"ACOS Number"
- +6 SET ONCOL=0
- +7 LOCK +^ONCO(160.1,DA):0
- IF $TEST
- DO ^DIE
- LOCK -^ONCO(160.1,DA)
- SET ONCOL=1
- +8 IF 'ONCOL
- WRITE !,"The site paramaters record is being edited by another user."
- +9 KILL ONCOL
- +10 KILL DIE
- SET DXH=X
- +11 ;Y is defined if user answered all prompts
- SET OKHERE=($DATA(Y)=0)
- +12 QUIT OKHERE
- +13 ;
- DEFOK() ;Confirm definitions
- +1 NEW OKHERE
- +2 SET OSP=$ORDER(^ONCO(160.1,"C",DUZ(2),0))
- +3 IF OSP=""
- SET OSP=$ORDER(^ONCO(160.1,0))
- +4 SET AC=$PIECE(^ONCO(160.1,OSP,1),U,4)
- +5 SET AC=$$GET1^DIQ(160.19,AC,.01,"I")
- +6 KILL OSP
- +7 WRITE !!!?20,"ACOS Number is ",$SELECT(AC'="":AC,1:"NOT defined in Site Parameters File")
- if AC'=""
- SET AASDXH=AC
- +8 if AASTYPNC="I"
- WRITE !?20,"Year for ACOS data is ",AASAY
- +9 IF AASTYPNC="A"
- WRITE !?20,"Accession Year ",AASAY,!?20,"Abstract Completed Date, Start is ",BYR("BY"),!?20,"Abstract Completed Date, End is ",BYR("BE")
- +10 WRITE !
- SET OKHERE=$$ASKY^ONCOU(" Definitions OK")
- +11 QUIT OKHERE
- REPORT ;Set variable for report to run instead of tape
- +1 NEW ONCOREP
- +2 SET ONCOREP=1
- SET AASTYPNC="I"
- DO LINE^ONCOANCQ
- DO CLEANUP^ONCOANC9
- QUIT
- +3 ;
- REQREP ;Set variable for required field report to run
- +1 NEW ONCOREQ
- +2 SET ONCOREQ=1
- DO ^ONCOANCQ
- DO CLEANUP^ONCOANC9
- QUIT
- +3 ;
- STATE ;Identifies desired date range for state data collection disk
- +1 if AASTYPNC'="A"
- QUIT
- IF AASAY'>1
- SET ALLOK=0
- QUIT
- +2 SET DIR(0)="D"
- SET DIR("A")=" Abstract Completed Date, Start"
- +3 SET DIR("B")="Jan 1, "_AASAY
- DO ^DIR
- KILL DIR("B")
- IF $DATA(DIRUT)
- SET ALLOK=0
- QUIT
- +4 SET BYR("B")=Y
- XECUTE ^DD("DD")
- WRITE " ",Y
- SET BYR("BY")=Y
- +5 SET DIR("A")=" Abstract Completed Date, End"
- SET DIR("B")="Dec 31, "_AASAY
- +6 DO ^DIR
- IF $DATA(DIRUT)
- SET ALLOK=0
- QUIT
- +7 SET BYR("E")=Y
- XECUTE ^DD("DD")
- WRITE " ",Y
- SET BYR("BE")=Y
- +8 KILL DIR
- +9 QUIT