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

DG53987P.m

Go to the documentation of this file.
  1. DG53987P ;ALB/JAM - DG*5.3*987 PRE INSTALL TO UPDATE HEALTH BENEFIT PLANS ;05/10/19 9:18pm
  1. ;;5.3;Registration;**987**;Aug 13, 1993;Build 22
  1. ;
  1. ; Integration Agreements:
  1. ; 10141 : BMES^XPDUTL
  1. ; : MES^XPDUTL
  1. ; 10018 : UPDATE^DIE
  1. Q
  1. ;Pre-install routine to perform the following tasks:
  1. ; Update the NAME (.01) field values for all HBP's in the HEALTH BENEFIT PLAN (#25.11) file to UPPERCASE.
  1. ;
  1. PRE ; Entry point for pre-install
  1. ;
  1. L +^DGHBP(25.11,0):10 I '$T D BMES^XPDUTL(" Health Benefit Plan (#25.11) File is locked by another user. Please log YOUR IT Services ticket.") Q
  1. ;
  1. ; Convert the NAME (.01) field values for all HBP's in the HEALTH BENEFIT PLAN (#25.11) file to UPPERCASE.
  1. D BMES^XPDUTL("NAME (#.01) field conversion Health Benefit Plan (#25.11) file is started.")
  1. D UPDPLN
  1. D BMES^XPDUTL("NAME (#.01) field conversion in Health Benefit Plan (#25.11) file is completed.")
  1. ;
  1. L -^DGHBP(25.11,0)
  1. Q
  1. ;
  1. UPDPLN ; Update existing plan names to UPPERCASE
  1. ;
  1. N DGIEN,DGPLAN,DGFIELDS,DGERR,DGPNAME,DGUNAME
  1. S DGERR="",DGIEN=0
  1. F S DGIEN=$O(^DGHBP(25.11,DGIEN)) Q:'DGIEN D
  1. . S DGPLAN=^DGHBP(25.11,DGIEN,0)
  1. . S DGPNAME=$P(DGPLAN,"^",1)
  1. . ; convert to UPPERCASE
  1. . S DGUNAME=$TR(DGPNAME,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
  1. . S DGFIELDS("NAME")=DGUNAME
  1. . D UPDPLN1(DGIEN,.DGFIELDS,.DGERR)
  1. . I DGERR'="" D
  1. . . D BMES^XPDUTL(" *** An Error occurred during converting ")
  1. . . D MES^XPDUTL(" "_DGPNAME)
  1. . . D MES^XPDUTL(" *** "_DGERR_" ***")
  1. . . D MES^XPDUTL(" Please log YOUR IT Services ticket.")
  1. Q
  1. ;
  1. UPDPLN1(DGIEN,DGFIELDS,DGERR) ; Update entries in the HEALTH BENEFIT PLAN File (25.11)
  1. ;
  1. ; Input: DGIEN - IEN of Plan,
  1. ; DGFIELDS - Array of Field Values
  1. ;
  1. ; Output: DGERR - Error Text
  1. ;
  1. N DGNAME,DGFDA
  1. K DGERR
  1. S DGERR=""
  1. S DGNAME=$G(DGFIELDS("NAME"))
  1. I DGNAME="" S DGERR="Missing Health Benefit Plan Name" Q
  1. I 'DGIEN S DGERR="IEN is not found" Q
  1. S DGIEN=DGIEN_","
  1. S DGFDA(25.11,DGIEN,.01)=DGNAME
  1. D UPDATE^DIE("E","DGFDA","","DGERR")
  1. I $D(DGERR("DIERR")) S DGERR=$G(DGERR("DIERR",1,"TEXT",1)) Q
  1. Q
  1. ;