VAQPRE34 ;FO-OAKLAND/GMB - Pre-init ;09/16/96 9:44 AM
;;1.5;PATIENT DATA EXCHANGE;**34**;NOV 17, 1993
ENTER ;
N VAQLAST,VAQIEN,DA,DIK
S VAQLAST=$O(^VAT(394.62,"B",99999999999999),-1)
S VAQIEN=$O(^VAT(394.86,0))
S ^VAT(394.86,VAQIEN,2)=VAQLAST
;F S VAQLAST=$O(^VAT(394.62,"B",VAQLAST)) Q:VAQLAST="" D
;. Q:VAQLAST?1N.N
;. S VAQIEN=0
;. F S VAQIEN=$O(^VAT(394.62,"B",VAQLAST,VAQIEN)) Q:'VAQIEN D
;. . S DA=VAQIEN,DIK="^VAT(394.62," D ^DIK
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQPRE34 468 printed Dec 13, 2024@02:26:13 Page 2
VAQPRE34 ;FO-OAKLAND/GMB - Pre-init ;09/16/96 9:44 AM
+1 ;;1.5;PATIENT DATA EXCHANGE;**34**;NOV 17, 1993
ENTER ;
+1 NEW VAQLAST,VAQIEN,DA,DIK
+2 SET VAQLAST=$ORDER(^VAT(394.62,"B",99999999999999),-1)
+3 SET VAQIEN=$ORDER(^VAT(394.86,0))
+4 SET ^VAT(394.86,VAQIEN,2)=VAQLAST
+5 ;F S VAQLAST=$O(^VAT(394.62,"B",VAQLAST)) Q:VAQLAST="" D
+6 ;. Q:VAQLAST?1N.N
+7 ;. S VAQIEN=0
+8 ;. F S VAQIEN=$O(^VAT(394.62,"B",VAQLAST,VAQIEN)) Q:'VAQIEN D
+9 ;. . S DA=VAQIEN,DIK="^VAT(394.62," D ^DIK
+10 QUIT