PXRMDATA ; SLC/PKR - Routines for getting data. ;08-Nov-2013 12:55;DU
;;2.0;CLINICAL REMINDERS;**4,6,1001**;Feb 04, 2005;Build 21
;IHS/MSC/MGH Patch 1001 Add IHS files
;
;===============================================
GETDATA(FILENUM,DAS,FIEVT) ;Return data for a finding.
K FIEVT
I FILENUM=45 D GETDATA^PXRMDGPT(DAS,.FIEVT) Q
I FILENUM=52 D GETDATA^PXRMDOUT(DAS,.FIEVT) Q
I FILENUM=55 D GETDATA^PXRMDIN(DAS,.FIEVT) Q
I FILENUM="55NVA" D GETDATA^PXRMDNVA(DAS,.FIEVT) Q
I FILENUM=63 D GETDATA^PXRMLAB(DAS,.FIEVT) Q
I FILENUM=70 D GETDATA^PXRMRAD(DAS,.FIEVT) Q
I FILENUM=100 D GETDATA^PXRMORDR(DAS,.FIEVT) Q
I FILENUM=120.5 D GETDATA^PXRMVITL(DAS,.FIEVT) Q
I FILENUM=601.84 D GETDATA^PXRMMH(DAS,.FIEVT) Q
I FILENUM=9000010 D GETDATA^PXRMVSIT(DAS,.FIEVT,1) Q
I FILENUM=9000010.07 D GETDATA^PXRMVPOV(DAS,.FIEVT) Q
I FILENUM=9000010.11 D GETDATA^PXRMIMM(DAS,.FIEVT) Q
I FILENUM=9000010.12 D GETDATA^PXRMSKIN(DAS,.FIEVT) Q
I FILENUM=9000010.13 D GETDATA^PXRMEXAM(DAS,.FIEVT) Q
I FILENUM=9000010.16 D GETDATA^PXRMEDU(DAS,.FIEVT) Q
I FILENUM=9000010.18 D GETDATA^PXRMVCPT(DAS,.FIEVT) Q
I FILENUM=9000010.23 D GETDATA^PXRMHF(DAS,.FIEVT) Q
I FILENUM=9000011 D GETDATA^PXRMPROB(DAS,.FIEVT) Q
;IHS/MSC/MGH Patch 1001 Get data for files IHS does not use
I FILENUM=9000010.01 D GETDATA^BPXRMEA(DAS,.FIEVT) Q
Q
;
;===============================================
GETFNAME(FINDING) ;Given a finding of the form IEN;GLOBAL return its name.
N DIC,DO,IEN,FNUM,GLOBAL
S IEN=$P(FINDING,";",1)
S GLOBAL=$P(FINDING,";",2)
S GLOBAL=$S(GLOBAL="PS(55NVA,":"PS(50.7,",GLOBAL="PS(55,":"PSDRUG(",1:GLOBAL)
S DIC="^"_GLOBAL
D DO^DIC1
S FNUM=+$P(DO,U,2)
Q $$GET1^DIQ(FNUM,IEN,.01)
;
;===============================================
GETFNUM(ENODE) ;Given an ENODE return the file number for the data source.
I ENODE="AUTTEDT(" Q 9000010.16
I ENODE="AUTTEXAM(" Q 9000010.13
I ENODE="AUTTHF(" Q 9000010.23
I ENODE="AUTTIMM(" Q 9000010.11
I ENODE="AUTTSK(" Q 9000010.12
I ENODE="GMRD(120.51," Q 120.5
I ENODE="LAB(60," Q 63
I ENODE="ORD(101.43," Q 100
I ENODE="PXD(811.2," Q 811.2
I ENODE="PXRMD(810.9," Q 9000010
I ENODE="PXRMD(811.4," Q 811.4
I ENODE="PXRMD(811.5," Q 811.5
I ENODE="PS(50.605," Q 52_U_55_U_"55NVA"
I ENODE="PS(55," Q 55
I ENODE="PS(55NVA," Q "55NVA"
I ENODE="PSDRUG(" Q 52_U_55_U_"55NVA"
I ENODE="PSNDF(50.6," Q 52_U_55_U_"55NVA"
I ENODE="PSRX(" Q 52
I ENODE="RAMIS(71," Q 70
I ENODE="YTT(601.71," Q 601.84
;IHS/MSC/MGH Add data for IHS files
I ENODE="AUTTMSR(" Q 9000010.01
Q 0
;
PXRMDATA ; SLC/PKR - Routines for getting data. ;08-Nov-2013 12:55;DU
+1 ;;2.0;CLINICAL REMINDERS;**4,6,1001**;Feb 04, 2005;Build 21
+2 ;IHS/MSC/MGH Patch 1001 Add IHS files
+3 ;
+4 ;===============================================
GETDATA(FILENUM,DAS,FIEVT) ;Return data for a finding.
+1 KILL FIEVT
+2 IF FILENUM=45
DO GETDATA^PXRMDGPT(DAS,.FIEVT)
QUIT
+3 IF FILENUM=52
DO GETDATA^PXRMDOUT(DAS,.FIEVT)
QUIT
+4 IF FILENUM=55
DO GETDATA^PXRMDIN(DAS,.FIEVT)
QUIT
+5 IF FILENUM="55NVA"
DO GETDATA^PXRMDNVA(DAS,.FIEVT)
QUIT
+6 IF FILENUM=63
DO GETDATA^PXRMLAB(DAS,.FIEVT)
QUIT
+7 IF FILENUM=70
DO GETDATA^PXRMRAD(DAS,.FIEVT)
QUIT
+8 IF FILENUM=100
DO GETDATA^PXRMORDR(DAS,.FIEVT)
QUIT
+9 IF FILENUM=120.5
DO GETDATA^PXRMVITL(DAS,.FIEVT)
QUIT
+10 IF FILENUM=601.84
DO GETDATA^PXRMMH(DAS,.FIEVT)
QUIT
+11 IF FILENUM=9000010
DO GETDATA^PXRMVSIT(DAS,.FIEVT,1)
QUIT
+12 IF FILENUM=9000010.07
DO GETDATA^PXRMVPOV(DAS,.FIEVT)
QUIT
+13 IF FILENUM=9000010.11
DO GETDATA^PXRMIMM(DAS,.FIEVT)
QUIT
+14 IF FILENUM=9000010.12
DO GETDATA^PXRMSKIN(DAS,.FIEVT)
QUIT
+15 IF FILENUM=9000010.13
DO GETDATA^PXRMEXAM(DAS,.FIEVT)
QUIT
+16 IF FILENUM=9000010.16
DO GETDATA^PXRMEDU(DAS,.FIEVT)
QUIT
+17 IF FILENUM=9000010.18
DO GETDATA^PXRMVCPT(DAS,.FIEVT)
QUIT
+18 IF FILENUM=9000010.23
DO GETDATA^PXRMHF(DAS,.FIEVT)
QUIT
+19 IF FILENUM=9000011
DO GETDATA^PXRMPROB(DAS,.FIEVT)
QUIT
+20 ;IHS/MSC/MGH Patch 1001 Get data for files IHS does not use
+21 IF FILENUM=9000010.01
DO GETDATA^BPXRMEA(DAS,.FIEVT)
QUIT
+22 QUIT
+23 ;
+24 ;===============================================
GETFNAME(FINDING) ;Given a finding of the form IEN;GLOBAL return its name.
+1 NEW DIC,DO,IEN,FNUM,GLOBAL
+2 SET IEN=$PIECE(FINDING,";",1)
+3 SET GLOBAL=$PIECE(FINDING,";",2)
+4 SET GLOBAL=$SELECT(GLOBAL="PS(55NVA,":"PS(50.7,",GLOBAL="PS(55,":"PSDRUG(",1:GLOBAL)
+5 SET DIC="^"_GLOBAL
+6 DO DO^DIC1
+7 SET FNUM=+$PIECE(DO,U,2)
+8 QUIT $$GET1^DIQ(FNUM,IEN,.01)
+9 ;
+10 ;===============================================
GETFNUM(ENODE) ;Given an ENODE return the file number for the data source.
+1 IF ENODE="AUTTEDT("
QUIT 9000010.16
+2 IF ENODE="AUTTEXAM("
QUIT 9000010.13
+3 IF ENODE="AUTTHF("
QUIT 9000010.23
+4 IF ENODE="AUTTIMM("
QUIT 9000010.11
+5 IF ENODE="AUTTSK("
QUIT 9000010.12
+6 IF ENODE="GMRD(120.51,"
QUIT 120.5
+7 IF ENODE="LAB(60,"
QUIT 63
+8 IF ENODE="ORD(101.43,"
QUIT 100
+9 IF ENODE="PXD(811.2,"
QUIT 811.2
+10 IF ENODE="PXRMD(810.9,"
QUIT 9000010
+11 IF ENODE="PXRMD(811.4,"
QUIT 811.4
+12 IF ENODE="PXRMD(811.5,"
QUIT 811.5
+13 IF ENODE="PS(50.605,"
QUIT 52_U_55_U_"55NVA"
+14 IF ENODE="PS(55,"
QUIT 55
+15 IF ENODE="PS(55NVA,"
QUIT "55NVA"
+16 IF ENODE="PSDRUG("
QUIT 52_U_55_U_"55NVA"
+17 IF ENODE="PSNDF(50.6,"
QUIT 52_U_55_U_"55NVA"
+18 IF ENODE="PSRX("
QUIT 52
+19 IF ENODE="RAMIS(71,"
QUIT 70
+20 IF ENODE="YTT(601.71,"
QUIT 601.84
+21 ;IHS/MSC/MGH Add data for IHS files
+22 IF ENODE="AUTTMSR("
QUIT 9000010.01
+23 QUIT 0
+24 ;