- VBECDCST ;hoifo/gjc-print data from VBECS STANDARD TABLE DATA (#6007);Nov 21, 2002
- ;;2.0;VBEC;;Jun 05, 2015;Build 4
- ;
- ;Medical Device #:
- ;Note: The food and Drug Administration classifies this software as a
- ;medical device. As such, it may not be changed in any way.
- ;Modifications to this software may result in an adulterated medical
- ;device under 21CFR820, the use of which is considered to be a
- ;violation of US Federal Statutes. Acquiring and implementing this
- ;software through the Freedom of Information Act requires the
- ;implementer to assume total responsibility for the software, and
- ;become a registered manufacturer of a medical device, subject to FDA
- ;regulations.
- ;
- ;Call to $$NEWERR^%ZTER is supported by IA: 1621
- ;Call to EN1^DIP is supported by IA: 10010
- ;Call to ^DIR is supported by IA: 10026
- ;Execution of ^%ZOSF("TEST") is supported by IA: 10096
- ;
- EN ; entry point for standard table data report
- ;
- I $S($D(DUZ)[0:1,$D(DUZ(0))[0:1,'DUZ:1,DUZ=.5:1,1:0) W !!?3,$C(7),"DUZ & DUZ(0) must be defined to an active user (not POSTMASTER) in order to",!?3,"proceed." Q
- ;
- ; initialize the error trap
- I $$NEWERR^%ZTER N $ETRAP,$ESTACK S $ETRAP="D ERR^VBECDCU1"
- E S X="D ERR^VBECDCU1",@^%ZOSF("TRAP")
- ;
- ; check to see that data exists in the VBECS STANDARD TABLE DATA FILE
- ; (#6007).
- I '+$O(^VBEC(6007,0)) D Q
- .W !!?3,"There is no data in the VBECS STANDARD TABLE DATA FILE (#6007)",!,"to be printed.",$C(7)
- .Q
- ;
- S VBECXIT=0 F D Q:VBECXIT
- .; enter the FROM range for the attribute name
- .S DIR(0)="FAO^1:175^K:X'?1AN.ANP X",DIR("A")="Start With Attribute Name: "
- .S DIR("?",1)=" To sort in sequence, starting with a particular Attribute Name, enter that"
- .S DIR("?",2)=" Attribute Name. Some displays might take a while due to the number of"
- .S DIR("?")=" records in the file."
- .D ^DIR S:$D(DTOUT)!$D(DUOUT) VBECXIT=-1 Q:VBECXIT
- .S VBECFR=Y K DIR,DIRUT,DTOUT,DUOUT,X,Y
- .; enter the TO range for the attribute name
- .S DIR(0)="FAO^1:175^K:X'?1AN.ANP X",DIR("A")="Go To Attribute Name: "
- .S DIR("?",1)=" To sort in sequence, up to a particular Attribute Name, enter that"
- .S DIR("?",2)=" Attribute Name. Some displays might take a while due to the number"
- .S DIR("?")=" of records in the file."
- .D ^DIR S:$D(DTOUT)!$D(DUOUT) VBECXIT=-1 Q:VBECXIT
- .S VBECTO=Y K DIR,DIRUT,DTOUT,DUOUT,X,Y
- .I $L(VBECFR),$L(VBECTO),(VBECFR]VBECTO) W !!,"'Go To' value must follow the 'Start With' value.",!
- .ELSE S VBECXIT=1
- .Q
- I VBECXIT=-1 D XIT QUIT
- I VBECFILE=61.3 D GO613
- I VBECFILE=65.4 D GO654
- Q
- ;
- GO613 ; entry point for antigen/antibody report
- S L=0,DIC="^VBEC(6007,"
- S FLDS=".01;C1;L28;""Name"",.04;C30;""Antibody/Antigen"",.02;C50;""SNOMED"""
- S BY=".11,.01",FR="61.3,"_VBECFR,TO="61.3,"_VBECTO D EN1^DIP
- D XIT
- Q
- ;
- GO654 ; entry point for transfusion reaction report
- S L=0,DIC="^VBEC(6007,"
- S FLDS=".01;C1;""Transfusion Reaction"""
- S BY=".11,.01",FR="65.4,"_VBECFR,TO="65.4,"_VBECTO D EN1^DIP
- D XIT
- Q
- ;
- XIT ; clean up symbol table, exit
- K BY,D0,DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,DIWF,FR,L,POP,TO,VBECFR,VBECTO,VBECXIT,X,Y
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVBECDCST 3175 printed Feb 19, 2025@00:10:39 Page 2
- VBECDCST ;hoifo/gjc-print data from VBECS STANDARD TABLE DATA (#6007);Nov 21, 2002
- +1 ;;2.0;VBEC;;Jun 05, 2015;Build 4
- +2 ;
- +3 ;Medical Device #:
- +4 ;Note: The food and Drug Administration classifies this software as a
- +5 ;medical device. As such, it may not be changed in any way.
- +6 ;Modifications to this software may result in an adulterated medical
- +7 ;device under 21CFR820, the use of which is considered to be a
- +8 ;violation of US Federal Statutes. Acquiring and implementing this
- +9 ;software through the Freedom of Information Act requires the
- +10 ;implementer to assume total responsibility for the software, and
- +11 ;become a registered manufacturer of a medical device, subject to FDA
- +12 ;regulations.
- +13 ;
- +14 ;Call to $$NEWERR^%ZTER is supported by IA: 1621
- +15 ;Call to EN1^DIP is supported by IA: 10010
- +16 ;Call to ^DIR is supported by IA: 10026
- +17 ;Execution of ^%ZOSF("TEST") is supported by IA: 10096
- +18 ;
- EN ; entry point for standard table data report
- +1 ;
- +2 IF $SELECT($DATA(DUZ)[0:1,$DATA(DUZ(0))[0:1,'DUZ:1,DUZ=.5:1,1:0)
- WRITE !!?3,$CHAR(7),"DUZ & DUZ(0) must be defined to an active user (not POSTMASTER) in order to",!?3,"proceed."
- QUIT
- +3 ;
- +4 ; initialize the error trap
- +5 IF $$NEWERR^%ZTER
- NEW $ETRAP,$ESTACK
- SET $ETRAP="D ERR^VBECDCU1"
- +6 IF '$TEST
- SET X="D ERR^VBECDCU1"
- SET @^%ZOSF("TRAP")
- +7 ;
- +8 ; check to see that data exists in the VBECS STANDARD TABLE DATA FILE
- +9 ; (#6007).
- +10 IF '+$ORDER(^VBEC(6007,0))
- Begin DoDot:1
- +11 WRITE !!?3,"There is no data in the VBECS STANDARD TABLE DATA FILE (#6007)",!,"to be printed.",$CHAR(7)
- +12 QUIT
- End DoDot:1
- QUIT
- +13 ;
- +14 SET VBECXIT=0
- FOR
- Begin DoDot:1
- +15 ; enter the FROM range for the attribute name
- +16 SET DIR(0)="FAO^1:175^K:X'?1AN.ANP X"
- SET DIR("A")="Start With Attribute Name: "
- +17 SET DIR("?",1)=" To sort in sequence, starting with a particular Attribute Name, enter that"
- +18 SET DIR("?",2)=" Attribute Name. Some displays might take a while due to the number of"
- +19 SET DIR("?")=" records in the file."
- +20 DO ^DIR
- if $DATA(DTOUT)!$DATA(DUOUT)
- SET VBECXIT=-1
- if VBECXIT
- QUIT
- +21 SET VBECFR=Y
- KILL DIR,DIRUT,DTOUT,DUOUT,X,Y
- +22 ; enter the TO range for the attribute name
- +23 SET DIR(0)="FAO^1:175^K:X'?1AN.ANP X"
- SET DIR("A")="Go To Attribute Name: "
- +24 SET DIR("?",1)=" To sort in sequence, up to a particular Attribute Name, enter that"
- +25 SET DIR("?",2)=" Attribute Name. Some displays might take a while due to the number"
- +26 SET DIR("?")=" of records in the file."
- +27 DO ^DIR
- if $DATA(DTOUT)!$DATA(DUOUT)
- SET VBECXIT=-1
- if VBECXIT
- QUIT
- +28 SET VBECTO=Y
- KILL DIR,DIRUT,DTOUT,DUOUT,X,Y
- +29 IF $LENGTH(VBECFR)
- IF $LENGTH(VBECTO)
- IF (VBECFR]VBECTO)
- WRITE !!,"'Go To' value must follow the 'Start With' value.",!
- +30 IF '$TEST
- SET VBECXIT=1
- +31 QUIT
- End DoDot:1
- if VBECXIT
- QUIT
- +32 IF VBECXIT=-1
- DO XIT
- QUIT
- +33 IF VBECFILE=61.3
- DO GO613
- +34 IF VBECFILE=65.4
- DO GO654
- +35 QUIT
- +36 ;
- GO613 ; entry point for antigen/antibody report
- +1 SET L=0
- SET DIC="^VBEC(6007,"
- +2 SET FLDS=".01;C1;L28;""Name"",.04;C30;""Antibody/Antigen"",.02;C50;""SNOMED"""
- +3 SET BY=".11,.01"
- SET FR="61.3,"_VBECFR
- SET TO="61.3,"_VBECTO
- DO EN1^DIP
- +4 DO XIT
- +5 QUIT
- +6 ;
- GO654 ; entry point for transfusion reaction report
- +1 SET L=0
- SET DIC="^VBEC(6007,"
- +2 SET FLDS=".01;C1;""Transfusion Reaction"""
- +3 SET BY=".11,.01"
- SET FR="65.4,"_VBECFR
- SET TO="65.4,"_VBECTO
- DO EN1^DIP
- +4 DO XIT
- +5 QUIT
- +6 ;
- XIT ; clean up symbol table, exit
- +1 KILL BY,D0,DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,DIWF,FR,L,POP,TO,VBECFR,VBECTO,VBECXIT,X,Y
- +2 QUIT
- +3 ;