- DG53987P ;ALB/JAM - DG*5.3*987 PRE INSTALL TO UPDATE HEALTH BENEFIT PLANS ;05/10/19 9:18pm
- ;;5.3;Registration;**987**;Aug 13, 1993;Build 22
- ;
- ; Integration Agreements:
- ; 10141 : BMES^XPDUTL
- ; : MES^XPDUTL
- ; 10018 : UPDATE^DIE
- Q
- ;Pre-install routine to perform the following tasks:
- ; Update the NAME (.01) field values for all HBP's in the HEALTH BENEFIT PLAN (#25.11) file to UPPERCASE.
- ;
- PRE ; Entry point for pre-install
- ;
- 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
- ;
- ; Convert the NAME (.01) field values for all HBP's in the HEALTH BENEFIT PLAN (#25.11) file to UPPERCASE.
- D BMES^XPDUTL("NAME (#.01) field conversion Health Benefit Plan (#25.11) file is started.")
- D UPDPLN
- D BMES^XPDUTL("NAME (#.01) field conversion in Health Benefit Plan (#25.11) file is completed.")
- ;
- L -^DGHBP(25.11,0)
- Q
- ;
- UPDPLN ; Update existing plan names to UPPERCASE
- ;
- N DGIEN,DGPLAN,DGFIELDS,DGERR,DGPNAME,DGUNAME
- S DGERR="",DGIEN=0
- F S DGIEN=$O(^DGHBP(25.11,DGIEN)) Q:'DGIEN D
- . S DGPLAN=^DGHBP(25.11,DGIEN,0)
- . S DGPNAME=$P(DGPLAN,"^",1)
- . ; convert to UPPERCASE
- . S DGUNAME=$TR(DGPNAME,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- . S DGFIELDS("NAME")=DGUNAME
- . D UPDPLN1(DGIEN,.DGFIELDS,.DGERR)
- . I DGERR'="" D
- . . D BMES^XPDUTL(" *** An Error occurred during converting ")
- . . D MES^XPDUTL(" "_DGPNAME)
- . . D MES^XPDUTL(" *** "_DGERR_" ***")
- . . D MES^XPDUTL(" Please log YOUR IT Services ticket.")
- Q
- ;
- UPDPLN1(DGIEN,DGFIELDS,DGERR) ; Update entries in the HEALTH BENEFIT PLAN File (25.11)
- ;
- ; Input: DGIEN - IEN of Plan,
- ; DGFIELDS - Array of Field Values
- ;
- ; Output: DGERR - Error Text
- ;
- N DGNAME,DGFDA
- K DGERR
- S DGERR=""
- S DGNAME=$G(DGFIELDS("NAME"))
- I DGNAME="" S DGERR="Missing Health Benefit Plan Name" Q
- I 'DGIEN S DGERR="IEN is not found" Q
- S DGIEN=DGIEN_","
- S DGFDA(25.11,DGIEN,.01)=DGNAME
- D UPDATE^DIE("E","DGFDA","","DGERR")
- I $D(DGERR("DIERR")) S DGERR=$G(DGERR("DIERR",1,"TEXT",1)) Q
- Q
- ;
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG53987P 2182 printed Feb 19, 2025@00:05:31 Page 2
- 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
- +2 ;
- +3 ; Integration Agreements:
- +4 ; 10141 : BMES^XPDUTL
- +5 ; : MES^XPDUTL
- +6 ; 10018 : UPDATE^DIE
- +7 QUIT
- +8 ;Pre-install routine to perform the following tasks:
- +9 ; Update the NAME (.01) field values for all HBP's in the HEALTH BENEFIT PLAN (#25.11) file to UPPERCASE.
- +10 ;
- PRE ; Entry point for pre-install
- +1 ;
- +2 LOCK +^DGHBP(25.11,0):10
- IF '$TEST
- DO BMES^XPDUTL(" Health Benefit Plan (#25.11) File is locked by another user. Please log YOUR IT Services ticket.")
- QUIT
- +3 ;
- +4 ; Convert the NAME (.01) field values for all HBP's in the HEALTH BENEFIT PLAN (#25.11) file to UPPERCASE.
- +5 DO BMES^XPDUTL("NAME (#.01) field conversion Health Benefit Plan (#25.11) file is started.")
- +6 DO UPDPLN
- +7 DO BMES^XPDUTL("NAME (#.01) field conversion in Health Benefit Plan (#25.11) file is completed.")
- +8 ;
- +9 LOCK -^DGHBP(25.11,0)
- +10 QUIT
- +11 ;
- UPDPLN ; Update existing plan names to UPPERCASE
- +1 ;
- +2 NEW DGIEN,DGPLAN,DGFIELDS,DGERR,DGPNAME,DGUNAME
- +3 SET DGERR=""
- SET DGIEN=0
- +4 FOR
- SET DGIEN=$ORDER(^DGHBP(25.11,DGIEN))
- if 'DGIEN
- QUIT
- Begin DoDot:1
- +5 SET DGPLAN=^DGHBP(25.11,DGIEN,0)
- +6 SET DGPNAME=$PIECE(DGPLAN,"^",1)
- +7 ; convert to UPPERCASE
- +8 SET DGUNAME=$TRANSLATE(DGPNAME,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- +9 SET DGFIELDS("NAME")=DGUNAME
- +10 DO UPDPLN1(DGIEN,.DGFIELDS,.DGERR)
- +11 IF DGERR'=""
- Begin DoDot:2
- +12 DO BMES^XPDUTL(" *** An Error occurred during converting ")
- +13 DO MES^XPDUTL(" "_DGPNAME)
- +14 DO MES^XPDUTL(" *** "_DGERR_" ***")
- +15 DO MES^XPDUTL(" Please log YOUR IT Services ticket.")
- End DoDot:2
- End DoDot:1
- +16 QUIT
- +17 ;
- UPDPLN1(DGIEN,DGFIELDS,DGERR) ; Update entries in the HEALTH BENEFIT PLAN File (25.11)
- +1 ;
- +2 ; Input: DGIEN - IEN of Plan,
- +3 ; DGFIELDS - Array of Field Values
- +4 ;
- +5 ; Output: DGERR - Error Text
- +6 ;
- +7 NEW DGNAME,DGFDA
- +8 KILL DGERR
- +9 SET DGERR=""
- +10 SET DGNAME=$GET(DGFIELDS("NAME"))
- +11 IF DGNAME=""
- SET DGERR="Missing Health Benefit Plan Name"
- QUIT
- +12 IF 'DGIEN
- SET DGERR="IEN is not found"
- QUIT
- +13 SET DGIEN=DGIEN_","
- +14 SET DGFDA(25.11,DGIEN,.01)=DGNAME
- +15 DO UPDATE^DIE("E","DGFDA","","DGERR")
- +16 IF $DATA(DGERR("DIERR"))
- SET DGERR=$GET(DGERR("DIERR",1,"TEXT",1))
- QUIT
- +17 QUIT
- +18 ;