DG1112P ;BIR/JFW - DG*5.3*1112 Post-Init ; 10/11/23 3:18pm
;;5.3;Registration;**1112**;Aug 13, 1993;Build 1
;
;BMES^XPDUTL and MES^XPDUTL - DBIA #10141 Supported
;
;STORY VAMPI-21549 (jfw) - Update 3 Name Values in File #47.77
;
POST ;
D BMES^XPDUTL("Post-Install: Starting")
D BMES^XPDUTL(" Updating Sexual Orientations in File #47.77"),MES^XPDUTL("")
D UPSONMES("SOLST1","SOLST2") ;Update SO Names in File #47.77
D BMES^XPDUTL("Post-Install: Finished")
Q
;
;Input:
; DGLSTB - List of Before Values in 47.77 to update
; DGLSTA - List of After Values in 47.77 to update with
UPSONMES(DGLSTB,DGLSTA) ;Update SO Names in File #47.77 as identified in lists
N DGI,DGENTRY,DGIEN,DGFDA,DGERR
F DGI=1:1 S DGENTRY=$P($T(@DGLSTB+DGI),";;",2) Q:(DGENTRY="") D
.S DGIEN=$$FIND1^DIC(47.77,"","B",DGENTRY,"","","")
.I (DGIEN=0) D MES^XPDUTL(" ERROR: Could not find '"_DGENTRY_"'") Q
.S DGFDA(47.77,DGIEN_",",.01)=$P($T(@DGLSTA+DGI),";;",2)
.D FILE^DIE("EK","DGFDA","DGERR")
.I $D(DGERR) D BMES^XPDUTL(" ERROR: '"_DGENTRY_"' was NOT updated."),MES^XPDUTL(" [#"_$G(DGERR("DIERR",1))_": "_$G(DGERR("DIERR",1,"TEXT",1))_"]") Q
.D MES^XPDUTL(" '"_DGENTRY_"' TO '"_$P($T(@DGLSTA+DGI),";;",2)_"'")
Q
;
SOLST1 ;List of Sexual Orientation Types (Current)
;;Lesbian, Gay or Homosexual
;;Another Option, please describe
;;Choose not to disclose
;;
SOLST2 ;List of Sexual Orientation Types (To Be)
;;Lesbian or Gay
;;A sexual orientation not listed here
;;Prefer not to answer
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG1112P 1538 printed Nov 22, 2024@17:45:16 Page 2
DG1112P ;BIR/JFW - DG*5.3*1112 Post-Init ; 10/11/23 3:18pm
+1 ;;5.3;Registration;**1112**;Aug 13, 1993;Build 1
+2 ;
+3 ;BMES^XPDUTL and MES^XPDUTL - DBIA #10141 Supported
+4 ;
+5 ;STORY VAMPI-21549 (jfw) - Update 3 Name Values in File #47.77
+6 ;
POST ;
+1 DO BMES^XPDUTL("Post-Install: Starting")
+2 DO BMES^XPDUTL(" Updating Sexual Orientations in File #47.77")
DO MES^XPDUTL("")
+3 ;Update SO Names in File #47.77
DO UPSONMES("SOLST1","SOLST2")
+4 DO BMES^XPDUTL("Post-Install: Finished")
+5 QUIT
+6 ;
+7 ;Input:
+8 ; DGLSTB - List of Before Values in 47.77 to update
+9 ; DGLSTA - List of After Values in 47.77 to update with
UPSONMES(DGLSTB,DGLSTA) ;Update SO Names in File #47.77 as identified in lists
+1 NEW DGI,DGENTRY,DGIEN,DGFDA,DGERR
+2 FOR DGI=1:1
SET DGENTRY=$PIECE($TEXT(@DGLSTB+DGI),";;",2)
if (DGENTRY="")
QUIT
Begin DoDot:1
+3 SET DGIEN=$$FIND1^DIC(47.77,"","B",DGENTRY,"","","")
+4 IF (DGIEN=0)
DO MES^XPDUTL(" ERROR: Could not find '"_DGENTRY_"'")
QUIT
+5 SET DGFDA(47.77,DGIEN_",",.01)=$PIECE($TEXT(@DGLSTA+DGI),";;",2)
+6 DO FILE^DIE("EK","DGFDA","DGERR")
+7 IF $DATA(DGERR)
DO BMES^XPDUTL(" ERROR: '"_DGENTRY_"' was NOT updated.")
DO MES^XPDUTL(" [#"_$GET(DGERR("DIERR",1))_": "_$GET(DGERR("DIERR",1,"TEXT",1))_"]")
QUIT
+8 DO MES^XPDUTL(" '"_DGENTRY_"' TO '"_$PIECE($TEXT(@DGLSTA+DGI),";;",2)_"'")
End DoDot:1
+9 QUIT
+10 ;
SOLST1 ;List of Sexual Orientation Types (Current)
+1 ;;Lesbian, Gay or Homosexual
+2 ;;Another Option, please describe
+3 ;;Choose not to disclose
+4 ;;
SOLST2 ;List of Sexual Orientation Types (To Be)
+1 ;;Lesbian or Gay
+2 ;;A sexual orientation not listed here
+3 ;;Prefer not to answer
+4 ;;