SD53P618 ;ALB/TXH - POST INIT ROUTINE FOR PATCH SD*5.3*618;Jul 22, 2014
 ;;5.3;Scheduling;**618**;Aug 13, 1993;Build 3
 ;
 ; This is the post-install for patch SD*5.3*618 to modify DESCRIPTION
 ; field (#10) of Appointment Type ORGAN DONORS in APPOINTMENT TYPE
 ; file (#409.1).
 Q
 ;
EN ; Entry point
 N SDFILE,SDFLD,SDTYPE
 S SDFILE=409.1,SDFLD=10,SDTYPE="ORGAN DONORS"
 D BMES^XPDUTL("SD*5.3*618 Post Installation -- ")
 D MES^XPDUTL(" ")
 D MES^XPDUTL("Update to APPOINTMENT TYPE file (#"_SDFILE_").")
 I '$D(^SD(SDFILE)) D BMES^XPDUTL("Missing file "_SDFILE_".")
 I $D(^SD(SDFILE)) D ACT
 Q
 ;
ACT ; Add new text
 N SDIEN,SDLINE,SDX
 I '$D(^SD(SDFILE,"B",SDTYPE)) D MISSMSG Q
 S SDIEN=$O(^SD(SDFILE,"B",SDTYPE,""))
 I '$D(^SD(SDFILE,SDIEN,0)) D MISSMSG Q
 F SDX=1:1 S SDLINE=$P($T(SDTXT+SDX),";;",2) Q:SDLINE="QUIT"  D
 . S SD(SDX,0)=SDLINE
 S SDIEN=SDIEN_","
 D WP^DIE(SDFILE,SDIEN,SDFLD,"K","SD","ERR")
 ; Display error messages if unsuccessful
 I $D(ERR) D  Q
 . S SDX="ERR" F  S SDX=$Q(@SDX) Q:SDX=""  D
 . . D BMES^XPDUTL(SDX)
 . . D MES^XPDUTL(@SDX)
 . D BMES^XPDUTL("*** Warning - DESCRIPTION field of")
 . D MES^XPDUTL("               Appointment Type "_SDTYPE_", file #409.1")
 . D MES^XPDUTL("               could not be modified.")
 . D BMES^XPDUTL(" Please contact the PIMS NATIONAL VISTA SUPPORT Team.")
 . D MES^XPDUTL("                 for assistance.")
 D BMES^XPDUTL("DESCRIPTION of Appointment Type "_SDTYPE_" successfully modified.")
 D MES^XPDUTL(" ")
 ;
 K ERR,SD,SDIEN,SDLINE,SDX
 Q
 ;
MISSMSG ; Missing messages
 D BMES^XPDUTL("Missing Appointment Type ORGAN DONORS in file #409.1...")
 D MES^XPDUTL("Please contact the PIMS NATIONAL VISTA SUPPORT Team.")
 Q
 ;
SDTXT ; New text for DESCRIPTION field
 ;;Exam of a veteran or non-veteran who wishes to be an organ 
 ;;donor to determine if organ designated will be useable.
 ;;QUIT
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53P618   1911     printed  Sep 23, 2025@20:22:57                                                                                                                                                                                                    Page 2
SD53P618  ;ALB/TXH - POST INIT ROUTINE FOR PATCH SD*5.3*618;Jul 22, 2014
 +1       ;;5.3;Scheduling;**618**;Aug 13, 1993;Build 3
 +2       ;
 +3       ; This is the post-install for patch SD*5.3*618 to modify DESCRIPTION
 +4       ; field (#10) of Appointment Type ORGAN DONORS in APPOINTMENT TYPE
 +5       ; file (#409.1).
 +6        QUIT 
 +7       ;
EN        ; Entry point
 +1        NEW SDFILE,SDFLD,SDTYPE
 +2        SET SDFILE=409.1
           SET SDFLD=10
           SET SDTYPE="ORGAN DONORS"
 +3        DO BMES^XPDUTL("SD*5.3*618 Post Installation -- ")
 +4        DO MES^XPDUTL(" ")
 +5        DO MES^XPDUTL("Update to APPOINTMENT TYPE file (#"_SDFILE_").")
 +6        IF '$DATA(^SD(SDFILE))
               DO BMES^XPDUTL("Missing file "_SDFILE_".")
 +7        IF $DATA(^SD(SDFILE))
               DO ACT
 +8        QUIT 
 +9       ;
ACT       ; Add new text
 +1        NEW SDIEN,SDLINE,SDX
 +2        IF '$DATA(^SD(SDFILE,"B",SDTYPE))
               DO MISSMSG
               QUIT 
 +3        SET SDIEN=$ORDER(^SD(SDFILE,"B",SDTYPE,""))
 +4        IF '$DATA(^SD(SDFILE,SDIEN,0))
               DO MISSMSG
               QUIT 
 +5        FOR SDX=1:1
               SET SDLINE=$PIECE($TEXT(SDTXT+SDX),";;",2)
               if SDLINE="QUIT"
                   QUIT 
               Begin DoDot:1
 +6                SET SD(SDX,0)=SDLINE
               End DoDot:1
 +7        SET SDIEN=SDIEN_","
 +8        DO WP^DIE(SDFILE,SDIEN,SDFLD,"K","SD","ERR")
 +9       ; Display error messages if unsuccessful
 +10       IF $DATA(ERR)
               Begin DoDot:1
 +11               SET SDX="ERR"
                   FOR 
                       SET SDX=$QUERY(@SDX)
                       if SDX=""
                           QUIT 
                       Begin DoDot:2
 +12                       DO BMES^XPDUTL(SDX)
 +13                       DO MES^XPDUTL(@SDX)
                       End DoDot:2
 +14               DO BMES^XPDUTL("*** Warning - DESCRIPTION field of")
 +15               DO MES^XPDUTL("               Appointment Type "_SDTYPE_", file #409.1")
 +16               DO MES^XPDUTL("               could not be modified.")
 +17               DO BMES^XPDUTL(" Please contact the PIMS NATIONAL VISTA SUPPORT Team.")
 +18               DO MES^XPDUTL("                 for assistance.")
               End DoDot:1
               QUIT 
 +19       DO BMES^XPDUTL("DESCRIPTION of Appointment Type "_SDTYPE_" successfully modified.")
 +20       DO MES^XPDUTL(" ")
 +21      ;
 +22       KILL ERR,SD,SDIEN,SDLINE,SDX
 +23       QUIT 
 +24      ;
MISSMSG   ; Missing messages
 +1        DO BMES^XPDUTL("Missing Appointment Type ORGAN DONORS in file #409.1...")
 +2        DO MES^XPDUTL("Please contact the PIMS NATIONAL VISTA SUPPORT Team.")
 +3        QUIT 
 +4       ;
SDTXT     ; New text for DESCRIPTION field
 +1       ;;Exam of a veteran or non-veteran who wishes to be an organ 
 +2       ;;donor to determine if organ designated will be useable.
 +3       ;;QUIT