MCPRE08 ;HIRMFO/DAD-PFT PREDICTED VALUES FILE (700.1) CLEANUP ;8/5/96 08:42
;;2.3;Medicine;;09/13/1996
;
N DA,DIE,DR,MCD0,MCOFFSET,MCPIECE,MCTYPE
S MCDATA(1)=""
S MCDATA(2)="Cleaning-up the PFT PREDICTED VALUES file (#700.1)."
D MES^XPDUTL(.MCDATA)
;
F MCOFFSET=1:1 S MCDATA=$P($T(TYPFLD+MCOFFSET),";",3) Q:MCDATA="" D
. S MCTYPE=$P(MCDATA,U),MCD0=0
. F S MCD0=$O(^MCAR(700.1,"AC",MCTYPE,MCD0)) Q:MCD0'>0 D
.. F MCPIECE=2:1 S MCFLD=$P(MCDATA,U,MCPIECE) Q:MCFLD="" D
... S MCOLDVAL=$P(MCFLD,";",2),MCFLD=$P(MCFLD,";")
... I $$GET1^DIQ(700.1,MCD0,MCFLD)'=MCOLDVAL Q
... S DIE="^MCAR(700.1,",DA=MCD0,DR=MCFLD_"///@"
... D ^DIE
... Q
.. Q
. Q
Q
TYPFLD ;; Sex_Type ^ Field1 ; Old_Value ^ Field2 ; Old_Value ^ ...
;;M^10;ACT-(.132*ACT)^12;ACT-(.132*ACT)^13;ACT-(.132*ACT)
;;F^10;ACT-(.132*ACT)^12;ACT-(.132*ACT)^13;ACT-(.132*ACT)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCPRE08 873 printed Dec 13, 2024@02:16:44 Page 2
MCPRE08 ;HIRMFO/DAD-PFT PREDICTED VALUES FILE (700.1) CLEANUP ;8/5/96 08:42
+1 ;;2.3;Medicine;;09/13/1996
+2 ;
+3 NEW DA,DIE,DR,MCD0,MCOFFSET,MCPIECE,MCTYPE
+4 SET MCDATA(1)=""
+5 SET MCDATA(2)="Cleaning-up the PFT PREDICTED VALUES file (#700.1)."
+6 DO MES^XPDUTL(.MCDATA)
+7 ;
+8 FOR MCOFFSET=1:1
SET MCDATA=$PIECE($TEXT(TYPFLD+MCOFFSET),";",3)
if MCDATA=""
QUIT
Begin DoDot:1
+9 SET MCTYPE=$PIECE(MCDATA,U)
SET MCD0=0
+10 FOR
SET MCD0=$ORDER(^MCAR(700.1,"AC",MCTYPE,MCD0))
if MCD0'>0
QUIT
Begin DoDot:2
+11 FOR MCPIECE=2:1
SET MCFLD=$PIECE(MCDATA,U,MCPIECE)
if MCFLD=""
QUIT
Begin DoDot:3
+12 SET MCOLDVAL=$PIECE(MCFLD,";",2)
SET MCFLD=$PIECE(MCFLD,";")
+13 IF $$GET1^DIQ(700.1,MCD0,MCFLD)'=MCOLDVAL
QUIT
+14 SET DIE="^MCAR(700.1,"
SET DA=MCD0
SET DR=MCFLD_"///@"
+15 DO ^DIE
+16 QUIT
End DoDot:3
+17 QUIT
End DoDot:2
+18 QUIT
End DoDot:1
+19 QUIT
TYPFLD ;; Sex_Type ^ Field1 ; Old_Value ^ Field2 ; Old_Value ^ ...
+1 ;;M^10;ACT-(.132*ACT)^12;ACT-(.132*ACT)^13;ACT-(.132*ACT)
+2 ;;F^10;ACT-(.132*ACT)^12;ACT-(.132*ACT)^13;ACT-(.132*ACT)