BKMVF5 ;PRXM/HC/JGH - Menu Tree "Add Patient Data" functionality; Mar 21, 2005
;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
QUIT
GETPAT() ;
; DFN,AGE,PNT,DOB, and SEX are being set here for another application.
; They should not be NEW'ed or KILL'ed.
;
N PIEN
K DIC,DFN
S DIC=90451
S DIC(0)="AEMQZ"
K DTOUT,DUOUT
D ^DIC
I $D(DTOUT)!$D(DUOUT)!($G(Y)<1) Q 0
K DIC,DA,DD,DR,DINUM,D,DLAYGO,DIADD
S DFN=$P(Y,"^",2),PIEN=+Y
S PNT=$G(Y(0,0)),AGE=$G(AGE)
S DOB=$$FMTE^XLFDT(DOB),SEX=$G(SEX)
K X,Y
QUIT 1
ADDPATNT ;
S REGISTER=$$HIVIEN^BKMIXX3()
I REGISTER="" Q
;
; The following line no longer applies
;I '$D(^BKM(90450,REGISTER,11,"B",DUZ)) Q
I '$$GETPAT Q
S HRN=$$HRN(DFN)
S RCRDHDR=$$PAD^BKMIXX4("Patient: ",">"," ",16)_$$PAD^BKMIXX4(PNT,">"," ",34)_$$PAD^BKMIXX4("HRN: ",">"," ",16)_$$PAD^BKMIXX4(HRN,">"," ",34)
D ADDDATA^BKMVA1(DFN)
K HRN,RCRDHDR,REGISTER
QUIT
HRN(DFN) ;
NEW DA,IENS
S DA(1)=DFN,DA=DUZ(2)
S IENS=$$IENS^DILF(.DA)
QUIT $$GET1^DIQ(9000001.41,IENS,.02,"E")
BKMVF5 ;PRXM/HC/JGH - Menu Tree "Add Patient Data" functionality; Mar 21, 2005
+1 ;;2.1;HIV MANAGEMENT SYSTEM;;Feb 07, 2011
+2 QUIT
GETPAT() ;
+1 ; DFN,AGE,PNT,DOB, and SEX are being set here for another application.
+2 ; They should not be NEW'ed or KILL'ed.
+3 ;
+4 NEW PIEN
+5 KILL DIC,DFN
+6 SET DIC=90451
+7 SET DIC(0)="AEMQZ"
+8 KILL DTOUT,DUOUT
+9 DO ^DIC
+10 IF $DATA(DTOUT)!$DATA(DUOUT)!($GET(Y)<1)
QUIT 0
+11 KILL DIC,DA,DD,DR,DINUM,D,DLAYGO,DIADD
+12 SET DFN=$PIECE(Y,"^",2)
SET PIEN=+Y
+13 SET PNT=$GET(Y(0,0))
SET AGE=$GET(AGE)
+14 SET DOB=$$FMTE^XLFDT(DOB)
SET SEX=$GET(SEX)
+15 KILL X,Y
+16 QUIT 1
ADDPATNT ;
+1 SET REGISTER=$$HIVIEN^BKMIXX3()
+2 IF REGISTER=""
QUIT
+3 ;
+4 ; The following line no longer applies
+5 ;I '$D(^BKM(90450,REGISTER,11,"B",DUZ)) Q
+6 IF '$$GETPAT
QUIT
+7 SET HRN=$$HRN(DFN)
+8 SET RCRDHDR=$$PAD^BKMIXX4("Patient: ",">"," ",16)_$$PAD^BKMIXX4(PNT,">"," ",34)_$$PAD^BKMIXX4("HRN: ",">"," ",16)_$$PAD^BKMIXX4(HRN,">"," ",34)
+9 DO ADDDATA^BKMVA1(DFN)
+10 KILL HRN,RCRDHDR,REGISTER
+11 QUIT
HRN(DFN) ;
+1 NEW DA,IENS
+2 SET DA(1)=DFN
SET DA=DUZ(2)
+3 SET IENS=$$IENS^DILF(.DA)
+4 QUIT $$GET1^DIQ(9000001.41,IENS,.02,"E")