- DPTLK4 ;ALB/JFP - MAS Patient Look-up Create stub entry patient file ; 09/01/96
- ;;V5.3;PATIENT FILE;**73**;DEC 11,1996
- FILE(FLDARR) ; -- Creates stub in patient file
- ;Inputs:
- ; FLDARR - array of field elements to file
- ;Outputs:
- ; 0 - sucess
- ; -1^error -
- ;
- ; -- Check input
- Q:'$D(FLDARR) "-1^required parameter not passed"
- ; -- New variables
- N Y
- ;
- ; -- Create stub entry in patient file
- S DIC="^DPT(",DIC(0)="L",DLAYGO=2
- ; -- Set X = patient name
- S X=$G(@FLDARR@(2))
- ; -- Set DIR string = SEX;DOB;SSN;PATIENT TYPE;VETERAN;SC
- S DIC("DR")=".02///"_$G(@FLDARR@(4))_";.03///"_$G(@FLDARR@(3))_";.09////"_$G(@FLDARR@(1))_";391///"_$G(@FLDARR@(5))_";1901///"_$G(@FLDARR@(6))_";.301///"_$G(@FLDARR@(7))
- K DD,DO D FILE^DICN
- K DIC,DLAYGO,X
- Q Y
- ;
- I $P(Y,"^",3)'=1 Q "-1^Could not add patient to patient file"
- Q 0
- ;
- DPTLK4 ;ALB/JFP - MAS Patient Look-up Create stub entry patient file ; 09/01/96
- +1 ;;V5.3;PATIENT FILE;**73**;DEC 11,1996
- FILE(FLDARR) ; -- Creates stub in patient file
- +1 ;Inputs:
- +2 ; FLDARR - array of field elements to file
- +3 ;Outputs:
- +4 ; 0 - sucess
- +5 ; -1^error -
- +6 ;
- +7 ; -- Check input
- +8 IF '$DATA(FLDARR)
- QUIT "-1^required parameter not passed"
- +9 ; -- New variables
- +10 NEW Y
- +11 ;
- +12 ; -- Create stub entry in patient file
- +13 SET DIC="^DPT("
- SET DIC(0)="L"
- SET DLAYGO=2
- +14 ; -- Set X = patient name
- +15 SET X=$GET(@FLDARR@(2))
- +16 ; -- Set DIR string = SEX;DOB;SSN;PATIENT TYPE;VETERAN;SC
- +17 SET DIC("DR")=".02///"_$GET(@FLDARR@(4))_";.03///"_$GET(@FLDARR@(3))_";.09////"_$GET(@FLDARR@(1))_";391///"_$GET(@FLDARR@(5))_";1901///"_$GET(@FLDARR@(6))_";.301///"_$GET(@FLDARR@(7))
- +18 KILL DD,DO
- DO FILE^DICN
- +19 KILL DIC,DLAYGO,X
- +20 QUIT Y
- +21 ;
- +22 IF $PIECE(Y,"^",3)'=1
- QUIT "-1^Could not add patient to patient file"
- +23 QUIT 0
- +24 ;