ECXUD1 ;ALB/JAP,BIR/DMA-Store Data from Unit Dose Package into 728.904 ; 26 Sep 95 / 12:44 PM
;;3.0;DSS EXTRACTS;**8,181**;Dec 22, 1997;Build 71
;
;Reference to ^XMD supported by ICR #10113
;Reference to ^XMB("NETNAME") supported by ICR #1131
;Reference to ^TMP($J supported by SACC 2.3.2.5.1
;
;called from 2 unit dose routines - PSGPLF and PSGAMSA
;load UD data into an EC file for later extract to vendor
N DA,DIK
;S X="ECXYUD1" X ^%ZOSF("TEST") I $T D ^ECXYUD1 ;181 - Commented out since routine did not exist
I '$D(^ECX(728.904)) Q
L +^ECX(728.904,0):1 Q:'$T
S EC=$O(^ECX(728.904,999999999),-1),EC=EC+1
S ^ECX(728.904,EC,0)=EC_U_ECUD L -^ECX(728.904,0)
S DA=EC,DIK="^ECX(728.904," D IX^DIK
K EC
Q
SENDMSG ;181 - Called from ECXUD
N ECMSG,ECX,XMSUB,XMDUZ,XMY,XMTEXT
;Send missing stop code message
S ECX=$O(^TMP($J,"ECXUDM","ECXNOSC",0))
I ECX D
.S XMSUB="CLINICS WITH MISSING STOP CODE in File #44",XMDUZ="DSS SYSTEM"
.K XMY S XMY("G.DSS-"_ECGRP_"@"_^XMB("NETNAME"))=""
.S ECMSG(1,0)="The DSS-"_ECPACK_" extract (#"_$P(EC23,U,2)_") for "_ECSDN_" through "_ECEDN
.S ECMSG(2,0)="contains the following clinics which have not been assigned a stop code in the"
.S ECMSG(3,0)="HOSPITAL LOCATION file (#44). The DSS-"_ECPACK_" extract records associated"
.S ECMSG(4,0)="with these clinics have been given a default Stop Code of ""PHA""."
.S ECMSG(5,0)=""
.S ECMSG(6,0)="CLIN IEN CLINIC NAME"
.S ECMSG(7,0)="-----------------------------------------"
.S ECMSG(8,0)=""
.S ECX=0
.F S ECX=$O(^TMP($J,"ECXUDM","ECXNOSC",ECX)) Q:ECX="" S ECMSG(8+ECX,0)=^TMP($J,"ECXUDM","ECXNOSC",ECX,0)
.S XMTEXT="ECMSG(" D ^XMD
;Send Inactive Stop Code message
S ECX=$O(^TMP($J,"ECXUDM","ECXINVSC",0))
I ECX D
.S XMSUB="CLINICS WITH INACTIVE STOP CODE",XMDUZ="DSS SYSTEM"
.K XMY S XMY("G.DSS-"_ECGRP_"@"_^XMB("NETNAME"))=""
.S ECMSG(1,0)="The DSS-"_ECPACK_" extract (#"_$P(EC23,U,2)_") for "_ECSDN_" through "_ECEDN
.S ECMSG(2,0)="contains the following clinics which have been assigned an inactive stop code"
.S ECMSG(3,0)="in the HOSPITAL LOCATION file (#44). The DSS-"_ECPACK_" extract records"
.S ECMSG(4,0)="associated with these clinics have been given a default Stop Code of ""PHA""."
.S ECMSG(5,0)=""
.S ECMSG(6,0)="CLINIC IEN/NAME STOP CODE NUMBER/NAME "
.S ECMSG(7,0)="--------------------------------------------------------------------"
.S ECMSG(8,0)=""
.S ECX=0
.F S ECX=$O(^TMP($J,"ECXUDM","ECXINVSC",ECX)) Q:ECX="" S ECMSG(8+ECX,0)=^TMP($J,"ECXUDM","ECXINVSC",ECX,0)
.S XMTEXT="ECMSG(" D ^XMD
K ^TMP($J,"ECXUDM")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECXUD1 2647 printed Nov 22, 2024@17:04:25 Page 2
ECXUD1 ;ALB/JAP,BIR/DMA-Store Data from Unit Dose Package into 728.904 ; 26 Sep 95 / 12:44 PM
+1 ;;3.0;DSS EXTRACTS;**8,181**;Dec 22, 1997;Build 71
+2 ;
+3 ;Reference to ^XMD supported by ICR #10113
+4 ;Reference to ^XMB("NETNAME") supported by ICR #1131
+5 ;Reference to ^TMP($J supported by SACC 2.3.2.5.1
+6 ;
+7 ;called from 2 unit dose routines - PSGPLF and PSGAMSA
+8 ;load UD data into an EC file for later extract to vendor
+9 NEW DA,DIK
+10 ;S X="ECXYUD1" X ^%ZOSF("TEST") I $T D ^ECXYUD1 ;181 - Commented out since routine did not exist
+11 IF '$DATA(^ECX(728.904))
QUIT
+12 LOCK +^ECX(728.904,0):1
if '$TEST
QUIT
+13 SET EC=$ORDER(^ECX(728.904,999999999),-1)
SET EC=EC+1
+14 SET ^ECX(728.904,EC,0)=EC_U_ECUD
LOCK -^ECX(728.904,0)
+15 SET DA=EC
SET DIK="^ECX(728.904,"
DO IX^DIK
+16 KILL EC
+17 QUIT
SENDMSG ;181 - Called from ECXUD
+1 NEW ECMSG,ECX,XMSUB,XMDUZ,XMY,XMTEXT
+2 ;Send missing stop code message
+3 SET ECX=$ORDER(^TMP($JOB,"ECXUDM","ECXNOSC",0))
+4 IF ECX
Begin DoDot:1
+5 SET XMSUB="CLINICS WITH MISSING STOP CODE in File #44"
SET XMDUZ="DSS SYSTEM"
+6 KILL XMY
SET XMY("G.DSS-"_ECGRP_"@"_^XMB("NETNAME"))=""
+7 SET ECMSG(1,0)="The DSS-"_ECPACK_" extract (#"_$PIECE(EC23,U,2)_") for "_ECSDN_" through "_ECEDN
+8 SET ECMSG(2,0)="contains the following clinics which have not been assigned a stop code in the"
+9 SET ECMSG(3,0)="HOSPITAL LOCATION file (#44). The DSS-"_ECPACK_" extract records associated"
+10 SET ECMSG(4,0)="with these clinics have been given a default Stop Code of ""PHA""."
+11 SET ECMSG(5,0)=""
+12 SET ECMSG(6,0)="CLIN IEN CLINIC NAME"
+13 SET ECMSG(7,0)="-----------------------------------------"
+14 SET ECMSG(8,0)=""
+15 SET ECX=0
+16 FOR
SET ECX=$ORDER(^TMP($JOB,"ECXUDM","ECXNOSC",ECX))
if ECX=""
QUIT
SET ECMSG(8+ECX,0)=^TMP($JOB,"ECXUDM","ECXNOSC",ECX,0)
+17 SET XMTEXT="ECMSG("
DO ^XMD
End DoDot:1
+18 ;Send Inactive Stop Code message
+19 SET ECX=$ORDER(^TMP($JOB,"ECXUDM","ECXINVSC",0))
+20 IF ECX
Begin DoDot:1
+21 SET XMSUB="CLINICS WITH INACTIVE STOP CODE"
SET XMDUZ="DSS SYSTEM"
+22 KILL XMY
SET XMY("G.DSS-"_ECGRP_"@"_^XMB("NETNAME"))=""
+23 SET ECMSG(1,0)="The DSS-"_ECPACK_" extract (#"_$PIECE(EC23,U,2)_") for "_ECSDN_" through "_ECEDN
+24 SET ECMSG(2,0)="contains the following clinics which have been assigned an inactive stop code"
+25 SET ECMSG(3,0)="in the HOSPITAL LOCATION file (#44). The DSS-"_ECPACK_" extract records"
+26 SET ECMSG(4,0)="associated with these clinics have been given a default Stop Code of ""PHA""."
+27 SET ECMSG(5,0)=""
+28 SET ECMSG(6,0)="CLINIC IEN/NAME STOP CODE NUMBER/NAME "
+29 SET ECMSG(7,0)="--------------------------------------------------------------------"
+30 SET ECMSG(8,0)=""
+31 SET ECX=0
+32 FOR
SET ECX=$ORDER(^TMP($JOB,"ECXUDM","ECXINVSC",ECX))
if ECX=""
QUIT
SET ECMSG(8+ECX,0)=^TMP($JOB,"ECXUDM","ECXINVSC",ECX,0)
+33 SET XMTEXT="ECMSG("
DO ^XMD
End DoDot:1
+34 KILL ^TMP($JOB,"ECXUDM")
+35 QUIT