source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DPTLK4.m@ 1739

Last change on this file since 1739 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 844 bytes
Line 
1DPTLK4 ;ALB/JFP - MAS Patient Look-up Create stub entry patient file ; 09/01/96
2 ;;V5.3;PATIENT FILE;**73**;DEC 11,1996
3FILE(FLDARR) ; -- Creates stub in patient file
4 ;Inputs:
5 ; FLDARR - array of field elements to file
6 ;Outputs:
7 ; 0 - sucess
8 ; -1^error -
9 ;
10 ; -- Check input
11 Q:'$D(FLDARR) "-1^required parameter not passed"
12 ; -- New variables
13 N Y
14 ;
15 ; -- Create stub entry in patient file
16 S DIC="^DPT(",DIC(0)="L",DLAYGO=2
17 ; -- Set X = patient name
18 S X=$G(@FLDARR@(2))
19 ; -- Set DIR string = SEX;DOB;SSN;PATIENT TYPE;VETERAN;SC
20 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))
21 K DD,DO D FILE^DICN
22 K DIC,DLAYGO,X
23 Q Y
24 ;
25 I $P(Y,"^",3)'=1 Q "-1^Could not add patient to patient file"
26 Q 0
27 ;
Note: See TracBrowser for help on using the repository browser.