LRMIAU1 ;DALISC/RBN - Microbiology Audit PREPROCESSOR ;July 22, 2008
;;5.2;LAB SERVICE;**350**;Sep 27, 1994;Build 230
;
; This routine is a shell so it will fit back into the proposed framework for LR*5.2*216
Q
;
;
FILEAUD(DATA) ;
; Replacement for FILEIT^LRMIAU1
; Expects LRDFN,LRIDT,LREDT,LRSB
; Inputs
; DATA : <byref> (File#,field)=value
; Outputs
; Returns #63.539 IEN or 0 if record not created
;
N X,LRIEN,LRIENS,LRFDA,LRMSG,DIERR
S LRIEN="+1"_","_LRIDT_","_LRDFN_","
I $G(LREDT)="" N LREDT S LREDT=$$NOW^XLFDT
S LRFDA(1,63.539,LRIEN,.01)=LREDT
S LRFDA(1,63.539,LRIEN,1)=LREDT
S LRFDA(1,63.539,LRIEN,2)=DUZ
I $G(DATA(63.539,3))'="" S LRFDA(1,63.539,LRIEN,3)=DATA(63.539,3)
I $G(DATA(63.539,4))'="" S LRFDA(1,63.539,LRIEN,4)=DATA(63.539,4)
I $G(LRSB),$$DATAOK(63.539,6,LRSB) S LRFDA(1,63.539,LRIEN,6)=$G(LRSB)
S LRFDA(1,63.539,LRIEN,7)=DUZ(2)
D UPDATE^DIE("","LRFDA(1)","LRIENS","LRMSG")
;
Q $G(LRIENS(1))
;
;
DATAOK(LRFILE,LRFLD,LRVAL) ;
; Checks if a value is appropriate for storing in the field
; Inputs
; LRFILE : File #
; LR FLD : Field #
; LRVAL : Value of the field
;
; Returns 0 (invalid) or 1 (valid)
;
N STATUS,LROUT,LRMSG
S STATUS=0
D CHK^DIE(LRFILE,LRFLD,"",LRVAL,.LROUT,"LRMSG")
I $G(LROUT)'="^" S STATUS=1
I $D(LRMSG) S STATUS=0
Q STATUS
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRMIAU1 1356 printed Dec 13, 2024@02:16:54 Page 2
LRMIAU1 ;DALISC/RBN - Microbiology Audit PREPROCESSOR ;July 22, 2008
+1 ;;5.2;LAB SERVICE;**350**;Sep 27, 1994;Build 230
+2 ;
+3 ; This routine is a shell so it will fit back into the proposed framework for LR*5.2*216
+4 QUIT
+5 ;
+6 ;
FILEAUD(DATA) ;
+1 ; Replacement for FILEIT^LRMIAU1
+2 ; Expects LRDFN,LRIDT,LREDT,LRSB
+3 ; Inputs
+4 ; DATA : <byref> (File#,field)=value
+5 ; Outputs
+6 ; Returns #63.539 IEN or 0 if record not created
+7 ;
+8 NEW X,LRIEN,LRIENS,LRFDA,LRMSG,DIERR
+9 SET LRIEN="+1"_","_LRIDT_","_LRDFN_","
+10 IF $GET(LREDT)=""
NEW LREDT
SET LREDT=$$NOW^XLFDT
+11 SET LRFDA(1,63.539,LRIEN,.01)=LREDT
+12 SET LRFDA(1,63.539,LRIEN,1)=LREDT
+13 SET LRFDA(1,63.539,LRIEN,2)=DUZ
+14 IF $GET(DATA(63.539,3))'=""
SET LRFDA(1,63.539,LRIEN,3)=DATA(63.539,3)
+15 IF $GET(DATA(63.539,4))'=""
SET LRFDA(1,63.539,LRIEN,4)=DATA(63.539,4)
+16 IF $GET(LRSB)
IF $$DATAOK(63.539,6,LRSB)
SET LRFDA(1,63.539,LRIEN,6)=$GET(LRSB)
+17 SET LRFDA(1,63.539,LRIEN,7)=DUZ(2)
+18 DO UPDATE^DIE("","LRFDA(1)","LRIENS","LRMSG")
+19 ;
+20 QUIT $GET(LRIENS(1))
+21 ;
+22 ;
DATAOK(LRFILE,LRFLD,LRVAL) ;
+1 ; Checks if a value is appropriate for storing in the field
+2 ; Inputs
+3 ; LRFILE : File #
+4 ; LR FLD : Field #
+5 ; LRVAL : Value of the field
+6 ;
+7 ; Returns 0 (invalid) or 1 (valid)
+8 ;
+9 NEW STATUS,LROUT,LRMSG
+10 SET STATUS=0
+11 DO CHK^DIE(LRFILE,LRFLD,"",LRVAL,.LROUT,"LRMSG")
+12 IF $GET(LROUT)'="^"
SET STATUS=1
+13 IF $DATA(LRMSG)
SET STATUS=0
+14 QUIT STATUS