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

DGRRPSKN.m

Go to the documentation of this file.
  1. DGRRPSKN ; ALB/SGG - rtnDGRR PatientServices Contact Information ;09/30/03 ; Compiled October 21, 2003 14:54:28
  1. ;;5.3;Registration;**557,1015**;Aug 13, 1993;Build 21
  1. ;
  1. DOC ;<DataSet Name='NextOfKinAddress'
  1. ;
  1. ;
  1. ;=======================================================
  1. ; PRIMARY NEXT OF KIN
  1. ;.211 K-NAME OF PRIMARY NOK (FaX), [.21;1]
  1. ;.212 K-RELATIONSHIP TO PATIENT (FX), [.21;2]
  1. ;.213 K-STREET ADDRESS [LINE 1] (FX), [.21;3]
  1. ;.214 K-STREET ADDRESS [LINE 2] (FX), [.21;4]
  1. ;.215 K-STREET ADDRESS [LINE 3] (FX), [.21;5]
  1. ;.216 K-CITY (FX), [.21;6]
  1. ;.217 K-STATE (P5'X), [.21;7]
  1. ; .2207 K-ZIP+4 (FOX), [.22;7]
  1. ;.218 K-ZIP CODE (FX), [.21;8]
  1. ;.219 K-PHONE NUMBER (FXa), [.21;9]
  1. ;.21011 K-WORK PHONE NUMBER (F), [.21;11]
  1. ;
  1. ;=======================================================
  1. ;SECONDARY NEXT OF KIN
  1. ;.2191 K2-NAME OF SECONDARY NOK (FX), [.211;1]
  1. ;.2192 K2-RELATIONSHIP TO PATIENT (FX), [.211;2]
  1. ;.2193 K2-STREET ADDRESS [LINE 1] (FX), [.211;3]
  1. ;.2194 K2-STREET ADDRESS [LINE 2] (FX), [.211;4]
  1. ;.2195 K2-STREET ADDRESS [LINE 3] (FX), [.211;5]
  1. ;.2196 K2-CITY (FX), [.211;6]
  1. ;.2197 K2-STATE (P5'X), [.211;7]
  1. ;.2198 K2-ZIP CODE (FX), [.211;8]
  1. ; .2203 K2-ZIP+4 (FOX), [.22;3]
  1. ;.2199 K2-PHONE NUMBER (FX), [.211;9]
  1. ;.211011 K2-WORK PHONE NUMBER (F), [.211;11]
  1. ;
  1. ;=======================================================
  1. ; DESIGNEE
  1. ;.341 D-NAME OF DESIGNEE (FX), [.34;1]
  1. ;.342 D-RELATIONSHIP TO PATIENT (FX), [.34;2]
  1. ;.343 D-STREET ADDRESS [LINE 1] (FX), [.34;3]
  1. ;.344 D-STREET ADDRESS [LINE 2] (FX), [.34;4]
  1. ;.345 D-STREET ADDRESS [LINE 3] (FX), [.34;5]
  1. ;.346 D-CITY (FX), [.34;6]
  1. ;.347 D-STATE (P5'X), [.34;7]
  1. ;.348 D-ZIP CODE (FX), [.34;8]
  1. ; .2202 D-ZIP+4 (FOX), [.22;2]
  1. ;.349 D-PHONE NUMBER (FX), [.34;9]
  1. ;.34011 D-WORK PHONE NUMBER (F), [.34;11]
  1. ;
  1. ;=======================================================
  1. ; EMERGENCY CONTACT
  1. ;.331 E-NAME (FX), [.33;1]
  1. ;.332 E-RELATIONSHIP TO PATIENT (FX), [.33;2]
  1. ;.333 E-STREET ADDRESS [LINE 1] (FX), [.33;3]
  1. ;.334 E-STREET ADDRESS [LINE 2] (FX), [.33;4]
  1. ;.335 E-STREET ADDRESS [LINE 3] (FX), [.33;5]
  1. ;.336 E-CITY (FX), [.33;6]
  1. ;.337 E-STATE (P5'X), [.33;7]
  1. ;.338 E-ZIP CODE (FX), [.33;8]
  1. ; .2201 E-ZIP+4 (FOX), [.22;1]
  1. ;.339 E-PHONE NUMBER (FX), [.33;9]
  1. ;.33011 E-WORK PHONE NUMBER (F), [.33;11]
  1. ;
  1. ;=======================================================
  1. ; SECONDARY EMERGENCY CONTACT
  1. ;.3311 E2-NAME OF SECONDARY CONTACT (FX), [.331;1]
  1. ;.3312 E2-RELATIONSHIP TO PATIENT (FX), [.331;2]
  1. ;.3313 E2-STREET ADDRESS [LINE 1] (FX), [.331;3]
  1. ;.3314 E2-STREET ADDRESS [LINE 2] (FX), [.331;4]
  1. ;.3315 E2-STREET ADDRESS [LINE 3] (FX), [.331;5]
  1. ;.3316 E2-CITY (FX), [.331;6]
  1. ;.3317 E2-STATE (P5'X), [.331;7]
  1. ;.3318 E2-ZIP CODE (FX), [.331;8]
  1. ; .2204 E2-ZIP+4 (FOX), [.22;4]
  1. ;.3319 E2-PHONE NUMBER (FX), [.331;9]
  1. ;.331011 E2-WORK PHONE NUMBER (F), [.331;11]
  1. ;
  1. ;=======================================================
  1. ;
  1. GETPSARY(PSARRAY) ;
  1. NEW CNT
  1. DO ADDRESS("NextOfKinAddress",$G(^DPT(PTID,.21)),7)
  1. DO ADDRESS("AltNextOfKinAddress",$G(^DPT(PTID,.211)),3)
  1. DO ADDRESS("DesigneeAddress",$G(^DPT(PTID,.34)),2)
  1. DO ADDRESS("EmergencyContactAddress",$G(^DPT(PTID,.33)),1)
  1. DO ADDRESS("AltEmergencyContactAddress",$G(^DPT(PTID,.331)),4)
  1. QUIT
  1. ;
  1. ADDRESS(DATASET,ADGLOB,ZIP4) ;
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="<DataSet Name='"_DATASET_"'"
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Street1^"_$P(ADGLOB,"^",3)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Street2^"_$P(ADGLOB,"^",4)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Street3^"_$P(ADGLOB,"^",5)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^City^"_$P(ADGLOB,"^",6)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^State^"_$$ADSTATE()
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^Zip^"_$$ADZIP()
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^PhoneNumber^"_$P(ADGLOB,"^",9)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^NameOfContact^"_$P(ADGLOB,"^",1)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^RelationshipToPatient^"_$P(ADGLOB,"^",2)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="^WorkPhoneNumber^"_$P(ADGLOB,"^",11)
  1. SET CNT=$G(CNT)+1,PSARRAY(CNT)="></DataSet>"_"^^^1"
  1. QUIT
  1. ;
  1. ADSTATE() ;
  1. NEW DATA
  1. SET DATA=$P(ADGLOB,"^",7)
  1. IF DATA'="" SET DATA=$P($G(^DIC(5,DATA,0)),"^",2)
  1. QUIT DATA
  1. ;
  1. Q
  1. ADZIP() ;
  1. NEW DATA
  1. SET DATA=$P(GLOB(.22),"^",ZIP4)
  1. IF DATA="" SET DATA=$P(ADGLOB,"^",8)
  1. QUIT DATA
  1. Q