Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DPTLK4

DPTLK4.m

Go to the documentation of this file.
  1. DPTLK4 ;ALB/JFP - MAS Patient Look-up Create stub entry patient file ; 09/01/96
  1. ;;V5.3;PATIENT FILE;**73**;DEC 11,1996
  1. FILE(FLDARR) ; -- Creates stub in patient file
  1. ;Inputs:
  1. ; FLDARR - array of field elements to file
  1. ;Outputs:
  1. ; 0 - sucess
  1. ; -1^error -
  1. ;
  1. ; -- Check input
  1. Q:'$D(FLDARR) "-1^required parameter not passed"
  1. ; -- New variables
  1. N Y
  1. ;
  1. ; -- Create stub entry in patient file
  1. S DIC="^DPT(",DIC(0)="L",DLAYGO=2
  1. ; -- Set X = patient name
  1. S X=$G(@FLDARR@(2))
  1. ; -- Set DIR string = SEX;DOB;SSN;PATIENT TYPE;VETERAN;SC
  1. 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))
  1. K DD,DO D FILE^DICN
  1. K DIC,DLAYGO,X
  1. Q Y
  1. ;
  1. I $P(Y,"^",3)'=1 Q "-1^Could not add patient to patient file"
  1. Q 0
  1. ;