XUMF4L2 ;OIFO-OAK/RAM - Load IMF ;02/21/02
;;8.0;KERNEL;**217**;Jul 10, 1995
;
; $$PARAM^HLCS2 call supported by IA #3552
;
LOCAL ; -- status message to site
;
I '$$ADD,'$$DEL,'$$MOD Q
;
N XMSUB,TEXT,XMDUZ,XMY,XMTEXT,I,ZIN
;
S ZIN="NAME^STATION NUMBER^STATUS^FACILITY TYPE^OFFICIAL VA NAME"
S ZIN=ZIN_"^INACTIVE FACILITY FLAG^STATE^VISN^PARENT FACILITY"
;
S I=0
;
S I=I+1,TEXT(I)="A backgroud job just updated your Institution file"
S I=I+1,TEXT(I)="with data from the Institution Master File (IMF)"
S I=I+1,TEXT(I)="on FORUM."
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)="This job was a special task to insure sites that"
S I=I+1,TEXT(I)="have already run the cleanup are up-to-date with"
S I=I+1,TEXT(I)="all updates."
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)="These updates were broadcast previously, but your"
S I=I+1,TEXT(I)="site may not have received them due to enabling"
S I=I+1,TEXT(I)="and/or disabling broadcasting to sites for various"
S I=I+1,TEXT(I)="reasons."
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)="This message has three sections (in addition to this"
S I=I+1,TEXT(I)="initial text.) The first section lists entries that"
S I=I+1,TEXT(I)="have been added to your file. The second section"
S I=I+1,TEXT(I)="lists existing entries that have modified. The third"
S I=I+1,TEXT(I)="section lists entries that have had their STATUS (#11)"
S I=I+1,TEXT(I)="changed from National to Local and their STATION"
S I=I+1,TEXT(I)="NUMBER (#99) removed (was never a valid sta #.)"
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)="The lists are in Station Number order and are up-arrow"
S I=I+1,TEXT(I)="delimited strings in the HL7 Institution segment"
S I=I+1,TEXT(I)="format. The values correspond to the FileMan fields"
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)=ZIN
S I=I+1,TEXT(I)=""
;
S I=I+1,TEXT(I)="SECTION ONE"
S I=I+1,TEXT(I)="The following entries were ADDED:"
S I=I+1,TEXT(I)=""
I $$ADD=0 S I=I+1,TEXT(I)="None.",I=I+1,TEXT(I)=""
I $$ADD D
.N STA S STA=""
.F S STA=$O(^TMP("XUMF ADD",$J,STA)) Q:STA="" D
..S I=I+1,TEXT(I)=$P(^TMP("XUMF ADD",$J,STA),U,2,10)
;
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)="SECTION TWO"
S I=I+1,TEXT(I)="The following entries were MODIFIED (old/new value):"
S I=I+1,TEXT(I)=""
I $$MOD=0 S I=I+1,TEXT(I)="None.",I=I+1,TEXT(I)=""
I $$MOD D
.N STA S STA=""
.F S STA=$O(^TMP("XUMF MOD",$J,STA)) Q:STA="" D
..S I=I+1,TEXT(I)=^TMP("XUMF MOD",$J,STA,"OLD")
..S I=I+1,TEXT(I)=^TMP("XUMF MOD",$J,STA,"NEW")
..S I=I+1,TEXT(I)=""
;
S I=I+1,TEXT(I)=""
S I=I+1,TEXT(I)="SECTION THREE"
S I=I+1,TEXT(I)="The following STATION NUMBERS were removed:"
S I=I+1,TEXT(I)=""
I $$DEL=0 S I=I+1,TEXT(I)="None.",I=I+1,TEXT(I)=""
I $$DEL D
.N STA S STA=""
.F S STA=$O(^TMP("XUMF DEL",$J,STA)) Q:STA="" D
..S I=I+1,TEXT(I)=" STA: "_STA_" IEN: "_$O(^TMP("XUMF DEL",$J,STA,0))
.S I=I+1,TEXT(I)=""
.S I=I+1,TEXT(I)="Note: Just the STATION NUMBER (#99) was removed"
.S I=I+1,TEXT(I)="and the STATUS (#11) changed to Local. The entry"
.S I=I+1,TEXT(I)="itself was NOT deleted."
;
S XMSUB="IFR/cleanup/updates at "_$$SITE
S XMDUZ=$S(DUZ:DUZ,1:.5)
S XMTEXT="TEXT("
S XMY("G.XUMF INSTITUTION")=""
S:$P($$PARAM^HLCS2,U,3)'="T" XMY("G.XUMF INSTITUTION@FORUM")=""
D ^XMD
Q
;
NVS ; -- status message to NVS
;
N XMSUB,TEXT,XMDUZ,XMY,XMTEXT
;
S TEXT(1)=$$SITE
S TEXT(2)=""
S TEXT(3)="Station numbers added: "_$$ADD
S TEXT(4)=" deleted: "_$$DEL
S TEXT(5)="File entries modified: "_$$MOD
;
S XMSUB="IFR/cleanup/status at "_$$SITE
S XMDUZ=$S(DUZ:DUZ,1:.5)
S XMTEXT="TEXT("
S XMY("G.XUMF INSTITUTION")=""
S:$P($$PARAM^HLCS2,U,3)'="T" XMY("G.XUMF INSTITUTION@FORUM")=""
D ^XMD
;
Q
;
SITE() ; -- facility name and sta # string
;
Q $P($G(^DIC(4,+DUZ(2),0)),U)_" Sta#: "_$P($G(^DIC(4,+DUZ(2),99)),U)
;
ADD() ; -- added sta #
;
N STA,CNT
S STA="",CNT=0
F S STA=$O(^TMP("XUMF ADD",$J,STA)) Q:STA="" S CNT=CNT+1
Q CNT
;
MOD() ; -- modified entries
;
N STA,CNT
S STA="",CNT=0
F S STA=$O(^TMP("XUMF MOD",$J,STA)) Q:STA="" S CNT=CNT+1
Q CNT
;
DEL() ; -- removed sta #
;
N STA,CNT
S STA="",CNT=0
F S STA=$O(^TMP("XUMF DEL",$J,STA)) Q:STA="" S CNT=CNT+1
Q CNT
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUMF4L2 4287 printed Dec 13, 2024@02:10:24 Page 2
XUMF4L2 ;OIFO-OAK/RAM - Load IMF ;02/21/02
+1 ;;8.0;KERNEL;**217**;Jul 10, 1995
+2 ;
+3 ; $$PARAM^HLCS2 call supported by IA #3552
+4 ;
LOCAL ; -- status message to site
+1 ;
+2 IF '$$ADD
IF '$$DEL
IF '$$MOD
QUIT
+3 ;
+4 NEW XMSUB,TEXT,XMDUZ,XMY,XMTEXT,I,ZIN
+5 ;
+6 SET ZIN="NAME^STATION NUMBER^STATUS^FACILITY TYPE^OFFICIAL VA NAME"
+7 SET ZIN=ZIN_"^INACTIVE FACILITY FLAG^STATE^VISN^PARENT FACILITY"
+8 ;
+9 SET I=0
+10 ;
+11 SET I=I+1
SET TEXT(I)="A backgroud job just updated your Institution file"
+12 SET I=I+1
SET TEXT(I)="with data from the Institution Master File (IMF)"
+13 SET I=I+1
SET TEXT(I)="on FORUM."
+14 SET I=I+1
SET TEXT(I)=""
+15 SET I=I+1
SET TEXT(I)="This job was a special task to insure sites that"
+16 SET I=I+1
SET TEXT(I)="have already run the cleanup are up-to-date with"
+17 SET I=I+1
SET TEXT(I)="all updates."
+18 SET I=I+1
SET TEXT(I)=""
+19 SET I=I+1
SET TEXT(I)="These updates were broadcast previously, but your"
+20 SET I=I+1
SET TEXT(I)="site may not have received them due to enabling"
+21 SET I=I+1
SET TEXT(I)="and/or disabling broadcasting to sites for various"
+22 SET I=I+1
SET TEXT(I)="reasons."
+23 SET I=I+1
SET TEXT(I)=""
+24 SET I=I+1
SET TEXT(I)="This message has three sections (in addition to this"
+25 SET I=I+1
SET TEXT(I)="initial text.) The first section lists entries that"
+26 SET I=I+1
SET TEXT(I)="have been added to your file. The second section"
+27 SET I=I+1
SET TEXT(I)="lists existing entries that have modified. The third"
+28 SET I=I+1
SET TEXT(I)="section lists entries that have had their STATUS (#11)"
+29 SET I=I+1
SET TEXT(I)="changed from National to Local and their STATION"
+30 SET I=I+1
SET TEXT(I)="NUMBER (#99) removed (was never a valid sta #.)"
+31 SET I=I+1
SET TEXT(I)=""
+32 SET I=I+1
SET TEXT(I)="The lists are in Station Number order and are up-arrow"
+33 SET I=I+1
SET TEXT(I)="delimited strings in the HL7 Institution segment"
+34 SET I=I+1
SET TEXT(I)="format. The values correspond to the FileMan fields"
+35 SET I=I+1
SET TEXT(I)=""
+36 SET I=I+1
SET TEXT(I)=ZIN
+37 SET I=I+1
SET TEXT(I)=""
+38 ;
+39 SET I=I+1
SET TEXT(I)="SECTION ONE"
+40 SET I=I+1
SET TEXT(I)="The following entries were ADDED:"
+41 SET I=I+1
SET TEXT(I)=""
+42 IF $$ADD=0
SET I=I+1
SET TEXT(I)="None."
SET I=I+1
SET TEXT(I)=""
+43 IF $$ADD
Begin DoDot:1
+44 NEW STA
SET STA=""
+45 FOR
SET STA=$ORDER(^TMP("XUMF ADD",$JOB,STA))
if STA=""
QUIT
Begin DoDot:2
+46 SET I=I+1
SET TEXT(I)=$PIECE(^TMP("XUMF ADD",$JOB,STA),U,2,10)
End DoDot:2
End DoDot:1
+47 ;
+48 SET I=I+1
SET TEXT(I)=""
+49 SET I=I+1
SET TEXT(I)="SECTION TWO"
+50 SET I=I+1
SET TEXT(I)="The following entries were MODIFIED (old/new value):"
+51 SET I=I+1
SET TEXT(I)=""
+52 IF $$MOD=0
SET I=I+1
SET TEXT(I)="None."
SET I=I+1
SET TEXT(I)=""
+53 IF $$MOD
Begin DoDot:1
+54 NEW STA
SET STA=""
+55 FOR
SET STA=$ORDER(^TMP("XUMF MOD",$JOB,STA))
if STA=""
QUIT
Begin DoDot:2
+56 SET I=I+1
SET TEXT(I)=^TMP("XUMF MOD",$JOB,STA,"OLD")
+57 SET I=I+1
SET TEXT(I)=^TMP("XUMF MOD",$JOB,STA,"NEW")
+58 SET I=I+1
SET TEXT(I)=""
End DoDot:2
End DoDot:1
+59 ;
+60 SET I=I+1
SET TEXT(I)=""
+61 SET I=I+1
SET TEXT(I)="SECTION THREE"
+62 SET I=I+1
SET TEXT(I)="The following STATION NUMBERS were removed:"
+63 SET I=I+1
SET TEXT(I)=""
+64 IF $$DEL=0
SET I=I+1
SET TEXT(I)="None."
SET I=I+1
SET TEXT(I)=""
+65 IF $$DEL
Begin DoDot:1
+66 NEW STA
SET STA=""
+67 FOR
SET STA=$ORDER(^TMP("XUMF DEL",$JOB,STA))
if STA=""
QUIT
Begin DoDot:2
+68 SET I=I+1
SET TEXT(I)=" STA: "_STA_" IEN: "_$ORDER(^TMP("XUMF DEL",$JOB,STA,0))
End DoDot:2
+69 SET I=I+1
SET TEXT(I)=""
+70 SET I=I+1
SET TEXT(I)="Note: Just the STATION NUMBER (#99) was removed"
+71 SET I=I+1
SET TEXT(I)="and the STATUS (#11) changed to Local. The entry"
+72 SET I=I+1
SET TEXT(I)="itself was NOT deleted."
End DoDot:1
+73 ;
+74 SET XMSUB="IFR/cleanup/updates at "_$$SITE
+75 SET XMDUZ=$SELECT(DUZ:DUZ,1:.5)
+76 SET XMTEXT="TEXT("
+77 SET XMY("G.XUMF INSTITUTION")=""
+78 if $PIECE($$PARAM^HLCS2,U,3)'="T"
SET XMY("G.XUMF INSTITUTION@FORUM")=""
+79 DO ^XMD
+80 QUIT
+81 ;
NVS ; -- status message to NVS
+1 ;
+2 NEW XMSUB,TEXT,XMDUZ,XMY,XMTEXT
+3 ;
+4 SET TEXT(1)=$$SITE
+5 SET TEXT(2)=""
+6 SET TEXT(3)="Station numbers added: "_$$ADD
+7 SET TEXT(4)=" deleted: "_$$DEL
+8 SET TEXT(5)="File entries modified: "_$$MOD
+9 ;
+10 SET XMSUB="IFR/cleanup/status at "_$$SITE
+11 SET XMDUZ=$SELECT(DUZ:DUZ,1:.5)
+12 SET XMTEXT="TEXT("
+13 SET XMY("G.XUMF INSTITUTION")=""
+14 if $PIECE($$PARAM^HLCS2,U,3)'="T"
SET XMY("G.XUMF INSTITUTION@FORUM")=""
+15 DO ^XMD
+16 ;
+17 QUIT
+18 ;
SITE() ; -- facility name and sta # string
+1 ;
+2 QUIT $PIECE($GET(^DIC(4,+DUZ(2),0)),U)_" Sta#: "_$PIECE($GET(^DIC(4,+DUZ(2),99)),U)
+3 ;
ADD() ; -- added sta #
+1 ;
+2 NEW STA,CNT
+3 SET STA=""
SET CNT=0
+4 FOR
SET STA=$ORDER(^TMP("XUMF ADD",$JOB,STA))
if STA=""
QUIT
SET CNT=CNT+1
+5 QUIT CNT
+6 ;
MOD() ; -- modified entries
+1 ;
+2 NEW STA,CNT
+3 SET STA=""
SET CNT=0
+4 FOR
SET STA=$ORDER(^TMP("XUMF MOD",$JOB,STA))
if STA=""
QUIT
SET CNT=CNT+1
+5 QUIT CNT
+6 ;
DEL() ; -- removed sta #
+1 ;
+2 NEW STA,CNT
+3 SET STA=""
SET CNT=0
+4 FOR
SET STA=$ORDER(^TMP("XUMF DEL",$JOB,STA))
if STA=""
QUIT
SET CNT=CNT+1
+5 QUIT CNT
+6 ;