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

DGDDDTTM.m

Go to the documentation of this file.
  1. DGDDDTTM ;ALB/MRL,BAJ,TDM,JAM,JAM - TRIGGER DT/TM CROSS REFERENCES [PATIENT] ;18 Sept 2017 12:54 PM
  1. ;;5.3;Registration;**665,653,688,754,941,997,1067**;Aug 13, 1993;Build 23
  1. ;
  1. ; This routine contains the code for new style cross-reference record
  1. ; triggers for the PATIENT File #2.
  1. ;
  1. ; DG*5.3*997;JAM; Added Country, Province and Postal Code fields in comments for NOK/E-Contact/Designee fields
  1. ; DG*5.3*1067;JAM; Added Relationship Type fields in comments for NOK/E-Contact/Designee fields
  1. ;
  1. TEMP ; PATIENT File #2 Record Index: ADTTM1
  1. ;
  1. ; This code updates the TEMPORARY ADDRESS CHANGE DT/TM field when any
  1. ; of the following Temporary Address related data changes for a patient:
  1. ;
  1. ; TEMPORARY STREET [LINE 1] (#.1211)
  1. ; TEMPORARY STREET [LINE 2] (#.1212)
  1. ; TEMPORARY STREET [LINE 3] (#.1213)
  1. ; TEMPORARY CITY (#.1214)
  1. ; TEMPORARY STATE (#.1215)
  1. ; TEMPORARY ZIP CODE (#.1216)
  1. ; TEMPORARY ADDRESS START DATE (#.1217)
  1. ; TEMPORARY ADDRESS END DATE (#.1218)
  1. ; TEMPORARY ADDRESS ACTIVE? (#.12105)
  1. ; TEMPORARY ZIP+4 (#.12112)
  1. ; TEMPORARY ADDRESS COUNTY (#.12111)
  1. ; TEMPORARY ADDRESS PROVINCE (#.1221)
  1. ; TEMPORARY ADDRESS POSTAL CODE (#.1222)
  1. ; TEMPORARY ADDRESS COUNTRY (#.1223)
  1. ;
  1. Q:$G(DGRONUPD)=1 ;Suppress update for ROM (set in routine DGROHLR1)
  1. N DGIEN,DATA S DATA(.12113)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. CONF ; PATIENT File #2 Record Index: ADTTM2
  1. ;
  1. ; This code updates the CONFIDENTIAL ADDR CHANGE DT/TM field when any
  1. ; of the following Confidential Address related data changes for a
  1. ; patient:
  1. ;
  1. ; CONFIDENTIAL STREET [LINE 1] (#.1411)
  1. ; CONFIDENTIAL STREET [LINE 2] (#.1412)
  1. ; CONFIDENTIAL STREET [LINE 3] (#.1413)
  1. ; CONFIDENTIAL ADDRESS CITY (#.1414)
  1. ; CONFIDENTIAL ADDRESS STATE (#.1415)
  1. ; CONFIDENTIAL ADDRESS ZIP CODE (#.1416)
  1. ; CONFIDENTIAL START DATE (#.1417)
  1. ; CONFIDENTIAL END DATE (#.1418)
  1. ; CONFIDENTIAL ADDRESS ACTIVE? (#.14105)
  1. ; CONFIDENTIAL ADDRESS COUNTY (#.14111)
  1. ; CONFIDENTIAL ADDR PROVINCE (#.14114)
  1. ; CONFIDENTIAL ADDR POSTAL CODE (#.14115)
  1. ; CONFIDENTIAL ADDR COUNTRY (#.14116)
  1. ; CONFIDENTIAL PHONE NUMBER (#.1315)
  1. ;
  1. Q:$G(DGRONUPD)=1 ;Suppress update for ROM (set in routine DGROHLR1)
  1. N DGIEN,DATA S DATA(.14112)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. PNOK ; PATIENT File #2 Record Index: ADTTM3
  1. ;
  1. ; This code updates the PRIMARY NOK CHANGE DATE/TIME field when any
  1. ; of the following Primary Next of Kin related data changes for a
  1. ; patient:
  1. ;
  1. ; K-NAME OF PRIMARY NOK (#.211)
  1. ; K-RELATIONSHIP TO PATIENT (#.212)
  1. ; K-STREET ADDRESS [LINE 1] (#.213)
  1. ; K-STREET ADDRESS [LINE 2] (#.214)
  1. ; K-STREET ADDRESS [LINE 3] (#.215)
  1. ; K-CITY (#.216)
  1. ; K-STATE (#.217)
  1. ; K-ZIP CODE (#.218)
  1. ; K-ADDRESS SAME AS PATIENT'S? (#.2125)
  1. ; K-ZIP+4 (#.2207)
  1. ; K-PHONE NUMBER (#.219)
  1. ; K-WORK PHONE NUMBER (#.21011)
  1. ; K-COUNTRY (#.221)
  1. ; K-PROVINCE (#.222)
  1. ; K-POSTAL CODE (#.223)
  1. ; K-RELATIONSHIP TYPE (#.224)
  1. ;
  1. N DGIEN,DATA S DATA(.21012)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. SNOK ; PATIENT File #2 Record Index: ADTTM4
  1. ;
  1. ; This code updates the SECONDARY NOK CHANGE DATE/TIME field when any
  1. ; of the following Secondary Next of Kin related data changes for a
  1. ; patient:
  1. ;
  1. ; K2-NAME OF SECONDARY NOK (#.2191)
  1. ; K2-RELATIONSHIP TO PATIENT (#.2192)
  1. ; K2-STREET ADDRESS [LINE 1] (#.2193)
  1. ; K2-STREET ADDRESS [LINE 2] (#.2194)
  1. ; K2-STREET ADDRESS [LINE 3] (#.2195)
  1. ; K2-CITY (#.2196)
  1. ; K2-STATE (#.2197)
  1. ; K2-ZIP CODE (#.2198)
  1. ; K2-ADDRESS SAME AS PATIENT'S? (#.21925)
  1. ; K2-ZIP+4 (#.2203)
  1. ; K2-PHONE NUMBER (#.2199)
  1. ; K2-WORK PHONE NUMBER (#.211011)
  1. ; K2-COUNTRY (#.2101)
  1. ; K2-PROVINCE (#.2102)
  1. ; K2-POSTAL CODE (#.2103)
  1. ; K2-RELATIONSHIP TYPE (#.2104)
  1. ;
  1. N DGIEN,DATA S DATA(.211012)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. ECON ; PATIENT File #2 Record Index: ADTTM5
  1. ;
  1. ; This code updates the E-CONTACT CHANGE DATE/TIME field when any
  1. ; of the following Emergency Contact related data changes for a
  1. ; patient:
  1. ;
  1. ; E-NAME (#.331)
  1. ; E-RELATIONSHIP TO PATIENT (#.332)
  1. ; E-STREET ADDRESS [LINE 1] (#.333)
  1. ; E-STREET ADDRESS [LINE 2] (#.334)
  1. ; E-STREET ADDRESS [LINE 3] (#.335)
  1. ; E-CITY (#.336)
  1. ; E-STATE (#.337)
  1. ; E-ZIP CODE (#.338)
  1. ; E-EMER. CONTACT SAME AS NOK? (#.3305)
  1. ; E-ZIP+4 (#.2201)
  1. ; E-PHONE NUMBER (#.339)
  1. ; E-WORK PHONE NUMBER (#.33011)
  1. ; E-COUNTRY (#.3306)
  1. ; E-PROVINCE (#.3307)
  1. ; E-POSTAL CODE (#.3308)
  1. ; E-RELATIONSHIP TYPE (#.3309)
  1. ;
  1. N DGIEN,DATA S DATA(.33012)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. ECON2 ; PATIENT File #2 Record Index: ADTTM6
  1. ;
  1. ; This code updates the E2-CONTACT CHANGE DATE/TIME field when any
  1. ; of the following Secondary Emergency Contact related data changes
  1. ; for a patient:
  1. ;
  1. ; E2-NAME OF SECONDARY CONTACT (#.3311)
  1. ; E2-RELATIONSHIP TO PATIENT (#.3312)
  1. ; E2-STREET ADDRESS [LINE 1] (#.3313)
  1. ; E2-STREET ADDRESS [LINE 2] (#.3314)
  1. ; E2-STREET ADDRESS [LINE 3] (#.3315)
  1. ; E2-CITY (#.3316)
  1. ; E2-STATE (#.3317)
  1. ; E2-ZIP CODE (#.3318)
  1. ; E2-ZIP+4 (#.2204)
  1. ; E2-PHONE NUMBER (#.3319)
  1. ; E2-WORK PHONE NUMBER (#.331011)
  1. ; E2-COUNTRY (#.331012)
  1. ; E2-PROVINCE (#.331013)
  1. ; E2-POSTAL CODE (#.331014)
  1. ; E2-RELATIONSHIP TYPE (#.331015)
  1. ;
  1. N DGIEN,DATA S DATA(.33112)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. DESIG ; PATIENT File #2 Record Index: ADTTM7
  1. ;
  1. ; This code updates the DESIGNEE CHANGE DATE/TIME field when any
  1. ; of the following Designee related data changes for a patient:
  1. ;
  1. ; D-NAME OF DESIGNEE (#.341)
  1. ; D-RELATIONSHIP TO PATIENT (#.342)
  1. ; D-STREET ADDRESS [LINE 1] (#.343)
  1. ; D-STREET ADDRESS [LINE 2] (#.344)
  1. ; D-STREET ADDRESS [LINE 3] (#.345)
  1. ; D-CITY (#.346)
  1. ; D-STATE (#.347)
  1. ; D-ZIP CODE (#.348)
  1. ; D-DESIGNEE SAME AS NOK? (#.3405)
  1. ; D-ZIP+4 (#.2202)
  1. ; D-PHONE NUMBER (#.349)
  1. ; D-WORK PHONE NUMBER (#.34011)
  1. ; D-COUNTRY (#.34012)
  1. ; D-PROVINCE (#.34013)
  1. ; D-POSTAL CODE (#.34014)
  1. ; D-RELATIONSHIP TYPE (#.34015)
  1. ;
  1. N DGIEN,DATA S DATA(.3412)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q
  1. ;
  1. ; DG*5.3*941; JAM; Added tag RES for Residential Address
  1. RES ; PATIENT File #2 Record Index: ADTTM8
  1. ;
  1. ; This code updates the RESIDENTIAL ADDR CHANGE DT/TM field when any
  1. ; of the following Residential Address related data changes for a
  1. ; patient:
  1. ;
  1. ; RESIDENTIAL STREET [LINE 1] (#.1151)
  1. ; RESIDENTIAL STREET [LINE 2] (#.1152)
  1. ; RESIDENTIAL STREET [LINE 3] (#.1153)
  1. ; RESIDENTIAL CITY (#.1154)
  1. ; RESIDENTIAL STATE (#.1155)
  1. ; RESIDENTIAL ZIP+4 (#.1156)
  1. ; RESIDENTIAL PROVINCE (#.11571)
  1. ; RESIDENTIAL POSTAL CODE (#.11572)
  1. ; RESIDENTIAL COUNTRY (#.11573)
  1. ;
  1. Q:$G(DGRONUPD)=1 ;Suppress update for ROM (set in routine DGROHLR1)
  1. N DGIEN,DATA S DATA(.1158)=$$NOW^XLFDT(),DGIEN=DA
  1. I $$UPD^DGENDBS(2,.DGIEN,.DATA)
  1. Q