ORWGAPIT ; SLC/STAFF - Graph Item Types ;11/20/06 08:58
;;3.0;ORDER ENTRY/RESULTS REPORTING;**215,260,243**;Dec 17, 1997;Build 242
;
COMPTYPE(FILE) ; $$(file) -> hs component abbrv - from ORWGAPID
N COMP,COMPNAME,COMPS,NUM,OK K COMPS
S COMPNAME=$$COMPNAME(FILE)_"]"
D COMP^ORWRP2(.COMPS)
S COMP=""
S OK=0
S NUM=0
D
. F S NUM=$O(COMPS(NUM)) Q:NUM<1 D I OK Q
.. S COMP=COMPS(NUM)
.. I COMP[COMPNAME,COMPNAME=$P($P(COMP,U,2),"[",2) S OK=1
Q COMP
;
COMPNAME(FILE) ; $$(file) -> hs component abbrv
I FILE=63 Q "CH"
I FILE=120.5 Q "VSD"
I FILE=120.8 Q "ADR"
I FILE=52 Q "RXOP"
I FILE=55 Q "RXUD"
I FILE=70 Q "II"
I FILE=9000010.11 Q "IM"
I FILE=9000010.12 Q "ST"
I FILE=9000010.13 Q "EXAM"
I FILE=9000010.18 Q "CPT"
I FILE=9000011 Q "PLL"
I FILE=9999911 Q "PLL"
I FILE=9000010.23 Q "HF"
I FILE=9000010.07 Q "OD"
I FILE=9000010.16 Q "ED"
I FILE=601.2 Q "MHPE"
I FILE=100 Q "ORC"
I FILE="45OP" Q "PRC"
I FILE="45DX" Q "DD"
I FILE="63AP" Q "SP"
I FILE="63BB" Q "BT"
I FILE="63MI" Q "MIC"
I FILE=9000010 Q "CVP"
I FILE=405 Q "ADC"
I FILE="55NVA" Q "RXNV"
I FILE=53.79 Q "BCMA"
I FILE=130 Q "SR"
I FILE=8925 Q "CNB"
I FILE=690 Q "MEDF"
Q ""
;
FILENAME(FILE) ; $$(file) -> filename - from ORWGAPIP
I FILE=63 Q "LAB TESTS"
I FILE=120.5 Q "VITALS"
I FILE=120.8 Q "ALLERGIES"
I FILE=52 Q "MEDICATION,OUTPATIENT"
I FILE=55 Q "MEDICATION,INPATIENT"
I FILE=70 Q "RADIOLOGY EXAMS"
I FILE=9000010.11 Q "IMMUNIZATIONS"
I FILE=9000010.12 Q "SKIN TESTS"
I FILE=9000010.13 Q "EXAMS"
I FILE=9000010.18 Q "PROCEDURES"
I FILE=9000011 Q "PROBLEMS"
I FILE=9999911 Q "PROBLEMS-DURATION" ;**************
I FILE=9000010.23 Q "HEALTH FACTORS"
I FILE=9000010.07 Q "PURPOSE OF VISIT"
I FILE=9000010.16 Q "PATIENT EDUCATION"
I FILE=601.2 Q "MENTAL HEALTH"
I FILE=100 Q "ORDERS"
I FILE="45OP" Q "REGISTRATION OP/PROC"
I FILE="45DX" Q "REGISTRATION DX"
I FILE="63AP" Q "ANATOMIC PATHOLOGY"
I FILE="63BB" Q "BLOOD PRODUCTS"
I FILE="63MI" Q "MICROBIOLOGY"
I FILE=9000010 Q "VISITS"
I FILE=405 Q "ADMISSIONS"
I FILE="55NVA" Q "MEDICATION,NON-VA"
I FILE=53.79 Q "MEDICATION,BCMA"
I FILE=50.605 Q "DRUG CLASS"
I FILE=68 Q "LAB ACC AREA"
I FILE=8925.1 Q "NOTE TITLE"
I FILE=100.98 Q "ORDER DISPLAY GROUP"
I FILE=811.2 Q "REMINDER TAXONOMY"
I FILE=130 Q "SURGERY"
I FILE=8925 Q "NOTES"
I FILE=690 Q "MEDICINE"
Q ""
;
FILECHK(FILES) ;
; get parameter string of excluded files
N CHECK,NUM,ORSRV,VAL
S ORSRV=$$GET1^DIQ(200,DUZ,29,"I")
S CHECK=$$XGET^ORWGAPIX("USR^SRV.`"_+$G(ORSRV)_"^DIV^SYS^PKG","ORWG GRAPH EXCLUDE DATA TYPE",1,"I")
S CHECK=CHECK_";"
S NUM=0
F S NUM=$O(FILES(NUM)) Q:NUM<1 D
. S VAL=FILES(NUM)
. S VAL=$P(VAL,U)_";"
. I CHECK[VAL K FILES(NUM)
Q
;
GETFILES(FILES) ;
; file #^file name^graph type^lookup file^lookup global^lookup index^prefix^abbrev^hint format
; commenting out a line setting FILES will inactivate that type
S FILES(1)="63^LAB TESTS^1^60^LAB(60,^B^^CH^~ ~units~flag~|"
S FILES(2)="120.5^VITALS^1^120.51^GMRD(120.51,^B^^VSD^~ ~"
S FILES(3)="52^MEDICATION,OUTPATIENT^3^50^PSDRUG(^B^^RXOP^~ ~"
S FILES(4)="55^MEDICATION,INPATIENT^3^50^PSDRUG(^B^^RXUD^~ ~"
S FILES(5)="70^RADIOLOGY EXAMS^2^71^RAMIS(71,^B^rad^II^~ ~"
S FILES(6)="9000010.11^IMMUNIZATIONS^2^9999999.14^AUTTIMM(^B^imm^IM^~ ~"
S FILES(7)="9000010.12^SKIN TESTS^2^9999999.28^AUTTSK(^B^skin^ST^~ ~"
S FILES(8)="9000010.13^EXAMS^2^9999999.15,^AUTTEXAM(^B^exam^EXAM^~ ~"
S FILES(9)="9000010.18^PROCEDURES^2^81^ICPT(^C^proc^CPT^~ ~"
S FILES(10)="9000011^PROBLEMS^2^80^ICD9(^B^prob^PLL^~ ~" ;***
S FILES(11)="9000010.23^HEALTH FACTORS^2^9999999.64^AUTTHF(,^B^hf^HF^~ ~"
S FILES(12)="9000010.07^PURPOSE OF VISIT^2^80^ICD9(^B^pov^OD^"
S FILES(13)="9000010.16^PATIENT EDUCATION^2^9999999.09^AUTTEDT(^B^edu^ED^~ ~"
S FILES(14)="601.2^MENTAL HEALTH^2^601^YTT(601,^B^mh^MHPE^~ ~"
S FILES(15)="100^ORDERS^2^101.43^ORD(101.43,^B^order^ORC^~ ~"
S FILES(16)="45OP^REGISTRATION OP/PROC^2^*^^^op^PRC^~ ~"
S FILES(17)="45DX^REGISTRATION DX^2^*^^^dx^DD^~ ~"
S FILES(18)="63AP^ANATOMIC PATHOLOGY^2^*^^^ap^SP^~ ~"
S FILES(19)="63MI^MICROBIOLOGY^2^*^^^micro^MIC^~ ~"
S FILES(20)="9000010^VISITS^3^44^SC(^B^^CVP^~ ~"
S FILES(21)="405^ADMISSIONS^3^*^^^^ADC^~ ~"
S FILES(23)="53.79^MEDICATION,BCMA^2^50.7^PS(50.7,^B^^BCMA^~ ~"
S FILES(24)="130^SURGERY^2^81^ICPT(^C^surg^SR^~ ~"
S FILES(25)="8925^NOTES^2^*^^^note^CNB^~ ~"
S FILES(27)="120.8^ALLERGIES^2^*^^^allg^ADR^~ ~"
S FILES(28)="63BB^BLOOD BANK^2^66^LAB(66,^B^bb^BT^~ ~"
;S FILES(29)="9999911^PROBLEMS-DURATION^3^80^ICD9(^B^prob^PLL^~ ~" ;***
S FILES(30)="55NVA^MEDICATION,NON-VA^3^50.7^PS(50.7,^B^^RXNV^~ ~"
S FILES(31)="690^MEDICINE^2^*^^^med^MEDF^~ ~"
S FILES(2000)="811.2^Reminder Taxonomy"
S FILES(3000)="50.605^Drug Class"
Q
;
TYPES(TYPES,DFN,SUB,TMP) ; from ORWGAPI
N CNT,FILES,ITEM,MEDARRAY,NUM,OK,SEQ K FILES,MEDARRAY
S TMP=$G(TMP)
D GETFILES(.FILES)
D FILECHK(.FILES)
I SUB D
. I $D(FILES(18)) D
.. S FILES(1801)="63AP;O^AP: Organ"
.. S FILES(1802)="63AP;T^AP: Test"
.. S FILES(1803)="63AP;D^AP: Disease"
.. S FILES(1804)="63AP;I^AP: ICD9"
.. S FILES(1805)="63AP;E^AP: Etiology"
.. S FILES(1806)="63AP;F^AP: Function"
.. S FILES(1807)="63AP;P^AP: Procedure"
.. S FILES(1808)="63AP;M^AP: Morphology"
.. S FILES(1809)="63AP;S^AP: Specimen"
. I $D(FILES(19)) D
.. S FILES(1901)="63MI;A^Microbiology: Antibiotic"
.. S FILES(1902)="63MI;T^Microbiology: Test"
.. S FILES(1903)="63MI;S^Microbiology: Specimen"
.. S FILES(1904)="63MI;O^Microbiology: Organism"
.. ;S FILES(1905)="63MI;M^Microbiology: TB Drug"
I 'SUB D
. K FILES(2000)
. K FILES(3000)
I DFN D
. I '$L($O(^PXRMINDX(63,"PI",DFN,""))) K FILES(1)
. I '$L($O(^PXRMINDX(120.5,"PI",DFN,""))) K FILES(2)
. I '$L($O(^PXRMINDX(52,"PI",DFN,""))) K FILES(3)
. I '$L($O(^PXRMINDX(55,"PI",DFN,""))) K FILES(4)
. I '$L($O(^PXRMINDX(70,"PI",DFN,""))) K FILES(5)
. I '$L($O(^PXRMINDX(9000010.11,"PI",DFN,""))) K FILES(6)
. I '$L($O(^PXRMINDX(9000010.12,"PI",DFN,""))) K FILES(7)
. I '$L($O(^PXRMINDX(9000010.13,"PI",DFN,""))) K FILES(8)
. I '$L($O(^PXRMINDX(9000010.18,"PPI",DFN,""))) K FILES(9)
. I '$L($O(^PXRMINDX(9000011,"PSPI",DFN,""))) K FILES(10),FILES(29)
. I '$L($O(^PXRMINDX(9000010.23,"PI",DFN,""))) K FILES(11)
. I '$L($O(^PXRMINDX(9000010.07,"PPI",DFN,""))) K FILES(12)
. I '$L($O(^PXRMINDX(9000010.16,"PI",DFN,""))) K FILES(13)
. I '$L($O(^PXRMINDX(601.2,"PI",DFN,""))) K FILES(14)
. I '$L($O(^PXRMINDX(100,"PI",DFN,""))) K FILES(15)
. I '$L($O(^PXRMINDX(45,"ICD0","PNI",DFN,0))) K FILES(16)
. I '$L($O(^PXRMINDX(45,"ICD9","PNI",DFN,0))) K FILES(17)
. I $E($O(^PXRMINDX(63,"PI",DFN,"A")))'="A" K FILES(18) D
.. F NUM=1:1:9 K FILES(180+NUM)
. I $E($O(^PXRMINDX(63,"PI",DFN,"M")))'="M" K FILES(19) D
.. F NUM=1:1:5 K FILES(190+NUM)
. I '$$VISITX^ORWGAPIA(DFN) K FILES(20)
. I '$$ADMITX^ORWGAPIA(DFN) K FILES(21)
. I '$$NVAX^ORWGAPIC(DFN) K FILES(22),FILES(30)
. I '$$BCMAX^ORWGAPIC(DFN) K FILES(23)
. I '$$SURGX^ORWGAPIA(DFN) K FILES(24)
. I '$$NOTEX^ORWGAPIA(DFN) K FILES(25)
. I '$$ALLERGYX^ORWGAPIA(DFN) K FILES(27)
. I '$$BBX^ORWGAPIB(DFN) K FILES(28)
. S OK=0
. D MEDICINE^ORWGAPIA(.MEDARRAY,DFN)
. I $O(MEDARRAY(0)) S OK=1
. I 'OK K FILES(31)
S CNT=0,SEQ=0
F S SEQ=$O(FILES(SEQ)) Q:SEQ<1 D
. S CNT=CNT+1
. I TMP S ^TMP(TYPES,$J,CNT)=FILES(SEQ)
. I 'TMP S TYPES(CNT)=FILES(SEQ)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORWGAPIT 7557 printed Dec 13, 2024@02:36:26 Page 2
ORWGAPIT ; SLC/STAFF - Graph Item Types ;11/20/06 08:58
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**215,260,243**;Dec 17, 1997;Build 242
+2 ;
COMPTYPE(FILE) ; $$(file) -> hs component abbrv - from ORWGAPID
+1 NEW COMP,COMPNAME,COMPS,NUM,OK
KILL COMPS
+2 SET COMPNAME=$$COMPNAME(FILE)_"]"
+3 DO COMP^ORWRP2(.COMPS)
+4 SET COMP=""
+5 SET OK=0
+6 SET NUM=0
+7 Begin DoDot:1
+8 FOR
SET NUM=$ORDER(COMPS(NUM))
if NUM<1
QUIT
Begin DoDot:2
+9 SET COMP=COMPS(NUM)
+10 IF COMP[COMPNAME
IF COMPNAME=$PIECE($PIECE(COMP,U,2),"[",2)
SET OK=1
End DoDot:2
IF OK
QUIT
End DoDot:1
+11 QUIT COMP
+12 ;
COMPNAME(FILE) ; $$(file) -> hs component abbrv
+1 IF FILE=63
QUIT "CH"
+2 IF FILE=120.5
QUIT "VSD"
+3 IF FILE=120.8
QUIT "ADR"
+4 IF FILE=52
QUIT "RXOP"
+5 IF FILE=55
QUIT "RXUD"
+6 IF FILE=70
QUIT "II"
+7 IF FILE=9000010.11
QUIT "IM"
+8 IF FILE=9000010.12
QUIT "ST"
+9 IF FILE=9000010.13
QUIT "EXAM"
+10 IF FILE=9000010.18
QUIT "CPT"
+11 IF FILE=9000011
QUIT "PLL"
+12 IF FILE=9999911
QUIT "PLL"
+13 IF FILE=9000010.23
QUIT "HF"
+14 IF FILE=9000010.07
QUIT "OD"
+15 IF FILE=9000010.16
QUIT "ED"
+16 IF FILE=601.2
QUIT "MHPE"
+17 IF FILE=100
QUIT "ORC"
+18 IF FILE="45OP"
QUIT "PRC"
+19 IF FILE="45DX"
QUIT "DD"
+20 IF FILE="63AP"
QUIT "SP"
+21 IF FILE="63BB"
QUIT "BT"
+22 IF FILE="63MI"
QUIT "MIC"
+23 IF FILE=9000010
QUIT "CVP"
+24 IF FILE=405
QUIT "ADC"
+25 IF FILE="55NVA"
QUIT "RXNV"
+26 IF FILE=53.79
QUIT "BCMA"
+27 IF FILE=130
QUIT "SR"
+28 IF FILE=8925
QUIT "CNB"
+29 IF FILE=690
QUIT "MEDF"
+30 QUIT ""
+31 ;
FILENAME(FILE) ; $$(file) -> filename - from ORWGAPIP
+1 IF FILE=63
QUIT "LAB TESTS"
+2 IF FILE=120.5
QUIT "VITALS"
+3 IF FILE=120.8
QUIT "ALLERGIES"
+4 IF FILE=52
QUIT "MEDICATION,OUTPATIENT"
+5 IF FILE=55
QUIT "MEDICATION,INPATIENT"
+6 IF FILE=70
QUIT "RADIOLOGY EXAMS"
+7 IF FILE=9000010.11
QUIT "IMMUNIZATIONS"
+8 IF FILE=9000010.12
QUIT "SKIN TESTS"
+9 IF FILE=9000010.13
QUIT "EXAMS"
+10 IF FILE=9000010.18
QUIT "PROCEDURES"
+11 IF FILE=9000011
QUIT "PROBLEMS"
+12 ;**************
IF FILE=9999911
QUIT "PROBLEMS-DURATION"
+13 IF FILE=9000010.23
QUIT "HEALTH FACTORS"
+14 IF FILE=9000010.07
QUIT "PURPOSE OF VISIT"
+15 IF FILE=9000010.16
QUIT "PATIENT EDUCATION"
+16 IF FILE=601.2
QUIT "MENTAL HEALTH"
+17 IF FILE=100
QUIT "ORDERS"
+18 IF FILE="45OP"
QUIT "REGISTRATION OP/PROC"
+19 IF FILE="45DX"
QUIT "REGISTRATION DX"
+20 IF FILE="63AP"
QUIT "ANATOMIC PATHOLOGY"
+21 IF FILE="63BB"
QUIT "BLOOD PRODUCTS"
+22 IF FILE="63MI"
QUIT "MICROBIOLOGY"
+23 IF FILE=9000010
QUIT "VISITS"
+24 IF FILE=405
QUIT "ADMISSIONS"
+25 IF FILE="55NVA"
QUIT "MEDICATION,NON-VA"
+26 IF FILE=53.79
QUIT "MEDICATION,BCMA"
+27 IF FILE=50.605
QUIT "DRUG CLASS"
+28 IF FILE=68
QUIT "LAB ACC AREA"
+29 IF FILE=8925.1
QUIT "NOTE TITLE"
+30 IF FILE=100.98
QUIT "ORDER DISPLAY GROUP"
+31 IF FILE=811.2
QUIT "REMINDER TAXONOMY"
+32 IF FILE=130
QUIT "SURGERY"
+33 IF FILE=8925
QUIT "NOTES"
+34 IF FILE=690
QUIT "MEDICINE"
+35 QUIT ""
+36 ;
FILECHK(FILES) ;
+1 ; get parameter string of excluded files
+2 NEW CHECK,NUM,ORSRV,VAL
+3 SET ORSRV=$$GET1^DIQ(200,DUZ,29,"I")
+4 SET CHECK=$$XGET^ORWGAPIX("USR^SRV.`"_+$GET(ORSRV)_"^DIV^SYS^PKG","ORWG GRAPH EXCLUDE DATA TYPE",1,"I")
+5 SET CHECK=CHECK_";"
+6 SET NUM=0
+7 FOR
SET NUM=$ORDER(FILES(NUM))
if NUM<1
QUIT
Begin DoDot:1
+8 SET VAL=FILES(NUM)
+9 SET VAL=$PIECE(VAL,U)_";"
+10 IF CHECK[VAL
KILL FILES(NUM)
End DoDot:1
+11 QUIT
+12 ;
GETFILES(FILES) ;
+1 ; file #^file name^graph type^lookup file^lookup global^lookup index^prefix^abbrev^hint format
+2 ; commenting out a line setting FILES will inactivate that type
+3 SET FILES(1)="63^LAB TESTS^1^60^LAB(60,^B^^CH^~ ~units~flag~|"
+4 SET FILES(2)="120.5^VITALS^1^120.51^GMRD(120.51,^B^^VSD^~ ~"
+5 SET FILES(3)="52^MEDICATION,OUTPATIENT^3^50^PSDRUG(^B^^RXOP^~ ~"
+6 SET FILES(4)="55^MEDICATION,INPATIENT^3^50^PSDRUG(^B^^RXUD^~ ~"
+7 SET FILES(5)="70^RADIOLOGY EXAMS^2^71^RAMIS(71,^B^rad^II^~ ~"
+8 SET FILES(6)="9000010.11^IMMUNIZATIONS^2^9999999.14^AUTTIMM(^B^imm^IM^~ ~"
+9 SET FILES(7)="9000010.12^SKIN TESTS^2^9999999.28^AUTTSK(^B^skin^ST^~ ~"
+10 SET FILES(8)="9000010.13^EXAMS^2^9999999.15,^AUTTEXAM(^B^exam^EXAM^~ ~"
+11 SET FILES(9)="9000010.18^PROCEDURES^2^81^ICPT(^C^proc^CPT^~ ~"
+12 ;***
SET FILES(10)="9000011^PROBLEMS^2^80^ICD9(^B^prob^PLL^~ ~"
+13 SET FILES(11)="9000010.23^HEALTH FACTORS^2^9999999.64^AUTTHF(,^B^hf^HF^~ ~"
+14 SET FILES(12)="9000010.07^PURPOSE OF VISIT^2^80^ICD9(^B^pov^OD^"
+15 SET FILES(13)="9000010.16^PATIENT EDUCATION^2^9999999.09^AUTTEDT(^B^edu^ED^~ ~"
+16 SET FILES(14)="601.2^MENTAL HEALTH^2^601^YTT(601,^B^mh^MHPE^~ ~"
+17 SET FILES(15)="100^ORDERS^2^101.43^ORD(101.43,^B^order^ORC^~ ~"
+18 SET FILES(16)="45OP^REGISTRATION OP/PROC^2^*^^^op^PRC^~ ~"
+19 SET FILES(17)="45DX^REGISTRATION DX^2^*^^^dx^DD^~ ~"
+20 SET FILES(18)="63AP^ANATOMIC PATHOLOGY^2^*^^^ap^SP^~ ~"
+21 SET FILES(19)="63MI^MICROBIOLOGY^2^*^^^micro^MIC^~ ~"
+22 SET FILES(20)="9000010^VISITS^3^44^SC(^B^^CVP^~ ~"
+23 SET FILES(21)="405^ADMISSIONS^3^*^^^^ADC^~ ~"
+24 SET FILES(23)="53.79^MEDICATION,BCMA^2^50.7^PS(50.7,^B^^BCMA^~ ~"
+25 SET FILES(24)="130^SURGERY^2^81^ICPT(^C^surg^SR^~ ~"
+26 SET FILES(25)="8925^NOTES^2^*^^^note^CNB^~ ~"
+27 SET FILES(27)="120.8^ALLERGIES^2^*^^^allg^ADR^~ ~"
+28 SET FILES(28)="63BB^BLOOD BANK^2^66^LAB(66,^B^bb^BT^~ ~"
+29 ;S FILES(29)="9999911^PROBLEMS-DURATION^3^80^ICD9(^B^prob^PLL^~ ~" ;***
+30 SET FILES(30)="55NVA^MEDICATION,NON-VA^3^50.7^PS(50.7,^B^^RXNV^~ ~"
+31 SET FILES(31)="690^MEDICINE^2^*^^^med^MEDF^~ ~"
+32 SET FILES(2000)="811.2^Reminder Taxonomy"
+33 SET FILES(3000)="50.605^Drug Class"
+34 QUIT
+35 ;
TYPES(TYPES,DFN,SUB,TMP) ; from ORWGAPI
+1 NEW CNT,FILES,ITEM,MEDARRAY,NUM,OK,SEQ
KILL FILES,MEDARRAY
+2 SET TMP=$GET(TMP)
+3 DO GETFILES(.FILES)
+4 DO FILECHK(.FILES)
+5 IF SUB
Begin DoDot:1
+6 IF $DATA(FILES(18))
Begin DoDot:2
+7 SET FILES(1801)="63AP;O^AP: Organ"
+8 SET FILES(1802)="63AP;T^AP: Test"
+9 SET FILES(1803)="63AP;D^AP: Disease"
+10 SET FILES(1804)="63AP;I^AP: ICD9"
+11 SET FILES(1805)="63AP;E^AP: Etiology"
+12 SET FILES(1806)="63AP;F^AP: Function"
+13 SET FILES(1807)="63AP;P^AP: Procedure"
+14 SET FILES(1808)="63AP;M^AP: Morphology"
+15 SET FILES(1809)="63AP;S^AP: Specimen"
End DoDot:2
+16 IF $DATA(FILES(19))
Begin DoDot:2
+17 SET FILES(1901)="63MI;A^Microbiology: Antibiotic"
+18 SET FILES(1902)="63MI;T^Microbiology: Test"
+19 SET FILES(1903)="63MI;S^Microbiology: Specimen"
+20 SET FILES(1904)="63MI;O^Microbiology: Organism"
+21 ;S FILES(1905)="63MI;M^Microbiology: TB Drug"
End DoDot:2
End DoDot:1
+22 IF 'SUB
Begin DoDot:1
+23 KILL FILES(2000)
+24 KILL FILES(3000)
End DoDot:1
+25 IF DFN
Begin DoDot:1
+26 IF '$LENGTH($ORDER(^PXRMINDX(63,"PI",DFN,"")))
KILL FILES(1)
+27 IF '$LENGTH($ORDER(^PXRMINDX(120.5,"PI",DFN,"")))
KILL FILES(2)
+28 IF '$LENGTH($ORDER(^PXRMINDX(52,"PI",DFN,"")))
KILL FILES(3)
+29 IF '$LENGTH($ORDER(^PXRMINDX(55,"PI",DFN,"")))
KILL FILES(4)
+30 IF '$LENGTH($ORDER(^PXRMINDX(70,"PI",DFN,"")))
KILL FILES(5)
+31 IF '$LENGTH($ORDER(^PXRMINDX(9000010.11,"PI",DFN,"")))
KILL FILES(6)
+32 IF '$LENGTH($ORDER(^PXRMINDX(9000010.12,"PI",DFN,"")))
KILL FILES(7)
+33 IF '$LENGTH($ORDER(^PXRMINDX(9000010.13,"PI",DFN,"")))
KILL FILES(8)
+34 IF '$LENGTH($ORDER(^PXRMINDX(9000010.18,"PPI",DFN,"")))
KILL FILES(9)
+35 IF '$LENGTH($ORDER(^PXRMINDX(9000011,"PSPI",DFN,"")))
KILL FILES(10),FILES(29)
+36 IF '$LENGTH($ORDER(^PXRMINDX(9000010.23,"PI",DFN,"")))
KILL FILES(11)
+37 IF '$LENGTH($ORDER(^PXRMINDX(9000010.07,"PPI",DFN,"")))
KILL FILES(12)
+38 IF '$LENGTH($ORDER(^PXRMINDX(9000010.16,"PI",DFN,"")))
KILL FILES(13)
+39 IF '$LENGTH($ORDER(^PXRMINDX(601.2,"PI",DFN,"")))
KILL FILES(14)
+40 IF '$LENGTH($ORDER(^PXRMINDX(100,"PI",DFN,"")))
KILL FILES(15)
+41 IF '$LENGTH($ORDER(^PXRMINDX(45,"ICD0","PNI",DFN,0)))
KILL FILES(16)
+42 IF '$LENGTH($ORDER(^PXRMINDX(45,"ICD9","PNI",DFN,0)))
KILL FILES(17)
+43 IF $EXTRACT($ORDER(^PXRMINDX(63,"PI",DFN,"A")))'="A"
KILL FILES(18)
Begin DoDot:2
+44 FOR NUM=1:1:9
KILL FILES(180+NUM)
End DoDot:2
+45 IF $EXTRACT($ORDER(^PXRMINDX(63,"PI",DFN,"M")))'="M"
KILL FILES(19)
Begin DoDot:2
+46 FOR NUM=1:1:5
KILL FILES(190+NUM)
End DoDot:2
+47 IF '$$VISITX^ORWGAPIA(DFN)
KILL FILES(20)
+48 IF '$$ADMITX^ORWGAPIA(DFN)
KILL FILES(21)
+49 IF '$$NVAX^ORWGAPIC(DFN)
KILL FILES(22),FILES(30)
+50 IF '$$BCMAX^ORWGAPIC(DFN)
KILL FILES(23)
+51 IF '$$SURGX^ORWGAPIA(DFN)
KILL FILES(24)
+52 IF '$$NOTEX^ORWGAPIA(DFN)
KILL FILES(25)
+53 IF '$$ALLERGYX^ORWGAPIA(DFN)
KILL FILES(27)
+54 IF '$$BBX^ORWGAPIB(DFN)
KILL FILES(28)
+55 SET OK=0
+56 DO MEDICINE^ORWGAPIA(.MEDARRAY,DFN)
+57 IF $ORDER(MEDARRAY(0))
SET OK=1
+58 IF 'OK
KILL FILES(31)
End DoDot:1
+59 SET CNT=0
SET SEQ=0
+60 FOR
SET SEQ=$ORDER(FILES(SEQ))
if SEQ<1
QUIT
Begin DoDot:1
+61 SET CNT=CNT+1
+62 IF TMP
SET ^TMP(TYPES,$JOB,CNT)=FILES(SEQ)
+63 IF 'TMP
SET TYPES(CNT)=FILES(SEQ)
End DoDot:1
+64 QUIT
+65 ;