ORUA444P ;EPIP/RTW - QUICK ORDER POST INSTALL ; 4/26/17 12:54am
;;3.0;ORDER ENTRY/RESULTS REPORTING;**444**;Dec 17, 1997;Build 48
;ICR# Type Description
;----- ---- -------------------------------------
;2053 Sup UPDATE^DIE
D ADDGROUP,ORADDRPC
Q
ADDGROUP ;
N ORDISPGP,ORDGSQCE,ORMBNAME,ORMXNAME,ORSHNAME,ORDGIEN,ORDGIEN2,ORX,MSG,FDA2,FDA
S ORDISPGP="" F ORDISPGP="DISCHARGE MEDS","PHARMACY UAP" Q:ORDISPGP="" D
. Q:$D(^ORD(100.98,"B",ORDISPGP))
. S:ORDISPGP="DISCHARGE MEDS" ORSHNAME="DM",ORMXNAME="DISCHARGE MEDS"
. S:ORDISPGP="PHARMACY UAP" ORSHNAME="UAP",ORMXNAME="UAP"
. S FDA(100.98,"+1,",.01)=ORDISPGP
. S FDA(100.98,"+1,",2)=ORMXNAME
. S FDA(100.98,"+1,",3)=ORSHNAME
. D UPDATE^DIE("","FDA","FDAIEN","MSG")
. S ORDGIEN=+$P($Q(^ORD(100.98,"B",ORDISPGP)),",",4)
. S ORDGSQCE=0,ORMBNAME="" S ORMBNAME="" F ORMBNAME="OUTPATIENT MEDICATIONS","INPATIENT MEDICATIONS","NON-VA MEDICATIONS" Q:ORMBNAME="" Q:(ORDISPGP="DISCHARGE MEDS")&(ORDGSQCE=1) D
. . S ORDGIEN2=0,ORDGIEN2=$O(^ORD(100.98,"B",ORMBNAME,ORDGIEN2))
. . S ORDGSQCE=ORDGSQCE+1
. . S FDA2(1,100.981,"+2,"_ORDGIEN_",",.001)=ORDGSQCE
. . S FDA2(1,100.981,"+2,"_ORDGIEN_",",.01)=ORDGIEN2
. . D UPDATE^DIE("","FDA2(1)")
. K FDA,FDAIEN
I $D(MSG) D Q
. S ORX="Display Group Creation Failed. The following error message was returned:"
. W !
. D MES^XPDUTL(ORX)
S ORX="Display Groups created successfully."
D MES^XPDUTL(ORX)
Q
ORADDRPC ;ADD RPCS TO THE OR CPRS GUI CHART OPTION
;GET OR CPRS GUI CHART IEN
;ORTO GETRVW
;ORTO SET UAP FLAG
;ORTO SETRVW
;ORTO UAPOFF
;ORTO DGROUP
N FDA,OROP,ORRPCIEN,ORTORPC
S OROP=+$P($Q(^DIC(19,"B","OR CPRS GUI CHART")),",",4)
S ORTORPC="" F ORTORPC="ORTO GETRVW","ORTO SET UAP FLAG","ORTO SETRVW","ORTO UAPOFF","ORTO DGROUP" Q:ORTORPC="" D
. S ORRPCIEN=0 S ORRPCIEN=$O(^XWB(8994,"B",ORTORPC,ORRPCIEN))
. Q:$D(^DIC(19,OROP,"RPC","B",ORRPCIEN))
. S FDA(1,19.05,"+2,"_OROP_",",.01)=ORRPCIEN
. D UPDATE^DIE("","FDA(1)")
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORUA444P 2011 printed Dec 13, 2024@02:34:24 Page 2
ORUA444P ;EPIP/RTW - QUICK ORDER POST INSTALL ; 4/26/17 12:54am
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**444**;Dec 17, 1997;Build 48
+2 ;ICR# Type Description
+3 ;----- ---- -------------------------------------
+4 ;2053 Sup UPDATE^DIE
+5 DO ADDGROUP
DO ORADDRPC
+6 QUIT
ADDGROUP ;
+1 NEW ORDISPGP,ORDGSQCE,ORMBNAME,ORMXNAME,ORSHNAME,ORDGIEN,ORDGIEN2,ORX,MSG,FDA2,FDA
+2 SET ORDISPGP=""
FOR ORDISPGP="DISCHARGE MEDS","PHARMACY UAP"
if ORDISPGP=""
QUIT
Begin DoDot:1
+3 if $DATA(^ORD(100.98,"B",ORDISPGP))
QUIT
+4 if ORDISPGP="DISCHARGE MEDS"
SET ORSHNAME="DM"
SET ORMXNAME="DISCHARGE MEDS"
+5 if ORDISPGP="PHARMACY UAP"
SET ORSHNAME="UAP"
SET ORMXNAME="UAP"
+6 SET FDA(100.98,"+1,",.01)=ORDISPGP
+7 SET FDA(100.98,"+1,",2)=ORMXNAME
+8 SET FDA(100.98,"+1,",3)=ORSHNAME
+9 DO UPDATE^DIE("","FDA","FDAIEN","MSG")
+10 SET ORDGIEN=+$PIECE($QUERY(^ORD(100.98,"B",ORDISPGP)),",",4)
+11 SET ORDGSQCE=0
SET ORMBNAME=""
SET ORMBNAME=""
FOR ORMBNAME="OUTPATIENT MEDICATIONS","INPATIENT MEDICATIONS","NON-VA MEDICATIONS"
if ORMBNAME=""
QUIT
if (ORDISPGP="DISCHARGE MEDS")&(ORDGSQCE=1)
QUIT
Begin DoDot:2
+12 SET ORDGIEN2=0
SET ORDGIEN2=$ORDER(^ORD(100.98,"B",ORMBNAME,ORDGIEN2))
+13 SET ORDGSQCE=ORDGSQCE+1
+14 SET FDA2(1,100.981,"+2,"_ORDGIEN_",",.001)=ORDGSQCE
+15 SET FDA2(1,100.981,"+2,"_ORDGIEN_",",.01)=ORDGIEN2
+16 DO UPDATE^DIE("","FDA2(1)")
End DoDot:2
+17 KILL FDA,FDAIEN
End DoDot:1
+18 IF $DATA(MSG)
Begin DoDot:1
+19 SET ORX="Display Group Creation Failed. The following error message was returned:"
+20 WRITE !
+21 DO MES^XPDUTL(ORX)
End DoDot:1
QUIT
+22 SET ORX="Display Groups created successfully."
+23 DO MES^XPDUTL(ORX)
+24 QUIT
ORADDRPC ;ADD RPCS TO THE OR CPRS GUI CHART OPTION
+1 ;GET OR CPRS GUI CHART IEN
+2 ;ORTO GETRVW
+3 ;ORTO SET UAP FLAG
+4 ;ORTO SETRVW
+5 ;ORTO UAPOFF
+6 ;ORTO DGROUP
+7 NEW FDA,OROP,ORRPCIEN,ORTORPC
+8 SET OROP=+$PIECE($QUERY(^DIC(19,"B","OR CPRS GUI CHART")),",",4)
+9 SET ORTORPC=""
FOR ORTORPC="ORTO GETRVW","ORTO SET UAP FLAG","ORTO SETRVW","ORTO UAPOFF","ORTO DGROUP"
if ORTORPC=""
QUIT
Begin DoDot:1
+10 SET ORRPCIEN=0
SET ORRPCIEN=$ORDER(^XWB(8994,"B",ORTORPC,ORRPCIEN))
+11 if $DATA(^DIC(19,OROP,"RPC","B",ORRPCIEN))
QUIT
+12 SET FDA(1,19.05,"+2,"_OROP_",",.01)=ORRPCIEN
+13 DO UPDATE^DIE("","FDA(1)")
End DoDot:1
+14 QUIT