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

DGENUPL5.m

Go to the documentation of this file.
  1. DGENUPL5 ;ALB/KCL/GSN - PROCESS INCOMING (Z11 EVENT TYPE) HL7 MESSAGES ; 5/6/03 2:45pm
  1. ;;5.3;Registration;**222,504,952**;08/13/93;Build 160
  1. ;
  1. ;DG*5.3*504 - Now, only updates the DG SECURITY LOG file #38.1 Zero
  1. ; node, when SECURITY LEVEL [#2] goes from a Non-sensitive
  1. ; value to a Sensitive value, i.e. (null or 0) to 1.
  1. GETLOCKS(DFN) ;
  1. ; Description - Locks first the patient enrollment history, then the patient record. Used to synchronize the upload with registration and load/edit.
  1. ;
  1. ;Input: DFN - ien of patient record.
  1. ;Output: none
  1. ;
  1. N COUNT,DGIEN33
  1. F COUNT=1:1:500 Q:$$BEGUPLD^DGENUPL3(DFN)
  1. F COUNT=1:1:500 Q:$$LOCK^DGENA1(DFN)
  1. F COUNT=1:1:500 Q:$$LOCK^DGENPTA1(DFN)
  1. S DGIEN33=+$O(^DGOTH(33,"B",DFN,"")) I DGIEN33 F COUNT=1:1:500 Q:$$LOCK^DGOTHUT1(DGIEN33) ; DG*5.3*952
  1. Q
  1. ;
  1. ;
  1. UNLOCK(DFN) ;
  1. ; Description: releases the locks obtained by GETLOCKS()
  1. ;
  1. ;Input: DFN - ien of patient record
  1. ;Output: none
  1. ;
  1. N DGIEN33
  1. D ENDUPLD^DGENUPL3(DFN)
  1. D UNLOCK^DGENA1(DFN)
  1. D UNLOCK^DGENPTA1(DFN)
  1. S DGIEN33=+$O(^DGOTH(33,"B",DFN,"")) I DGIEN33 D UNLOCK^DGOTHUT1(DGIEN33) ; DG*5.3*952
  1. Q
  1. ;
  1. ;
  1. SECUPLD(DFN,DGSEC,OLDSEC) ;
  1. ; Description: Upload a patient security record receieved from the
  1. ; HEC. The consistency checks on the record are assumed
  1. ; to have been completed.
  1. ;
  1. ; Input:
  1. ; DFN - PATIENT ien
  1. ; DGSEC - as array containing the patient security record, pass
  1. ; by reference
  1. ;
  1. ; Output:
  1. ; OLDSEC - as array containing the patient security record, prior
  1. ; to upload of security data from HEC, pass by reference
  1. ;
  1. ;
  1. N SECIEN
  1. ;
  1. ; is there a local security log record for the patient?
  1. S SECIEN=$$FINDSEC^DGENSEC(DFN)
  1. ;
  1. ; if local security record, obtain record prior to upload
  1. I $$GET^DGENSEC(SECIEN,.OLDSEC)
  1. ;
  1. ; if no local security log record for the patient, create a new
  1. ; security log entry with HEC security
  1. I 'SECIEN D
  1. .I $$STORE^DGENSEC(.DGSEC)
  1. E D
  1. .; otherwise update the existing security log entry with HEC security
  1. .; if new level = Yes and old level Not = Yes (DG*5.3*504)
  1. .I $G(DGSEC("LEVEL"))=1,$G(OLDSEC("LEVEL"))'=1 D
  1. ..I $$UPDATE^DGENSEC(DFN,.DGSEC)
  1. .E D
  1. ..; since no update occurring, then set arrays the same to prevent an
  1. ..; Audit record from being created later.
  1. ..M DGSEC=OLDSEC
  1. ;
  1. Q