APCDBMSR ; IHS/CMI/LAB - ENTER BIRTH MEASUREMENT
;;2.0;IHS PCC SUITE;**7**;MAY 14, 2009
;
;
BM ;EP - called from d/e input template APCD BM (BM)
S APCDREPI=DA
D EN^XBNEW("BM1^APCDBMSR","APCDREPI;APCDDATE")
K Y
Q
BM1 ;EP - called from XBNEW call
S APCDRFS="",APCDPARS=""
I '$D(^AUPNBMSR(APCDREPI)) S X=$$BMADD(APCDREPI) I 'X W $P(X,U,2) Q
BM11 ;
S DIE="^AUPNBMSR(",DA=APCDREPI,DR="[APCD BM EDIT]" D ^DIE
K DIE,DA,DR
BM12 ;
;D FM1
K Y
Q
;
PAUSE ;EP
S DIR(0)="EO",DIR("A")="Press enter to continue...." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
Q
BMADD(P) ;PEP - called to add a patient to the BIRTH MEASUREMENTs file
;output: DFN (ien of entry, file is dinum)
; 0^error message if add failed
I '$G(P) Q 0_"^patient DFN invalid"
I '$D(^DPT(P)) Q 0_"^patient DFN invalid"
I $D(^AUPNBMSR(P,0)) Q P
NEW X,DIC,DD,D0,DO,Y
S X=P,DIC="^AUPNBMSR(",DIC(0)="L"
K DD,D0,DO,DINUM
S DINUM=X
D FILE^DICN
I Y=-1 Q 0_"^fileman failed adding patient"
Q 1
;
APCDBMSR ; IHS/CMI/LAB - ENTER BIRTH MEASUREMENT
+1 ;;2.0;IHS PCC SUITE;**7**;MAY 14, 2009
+2 ;
+3 ;
BM ;EP - called from d/e input template APCD BM (BM)
+1 SET APCDREPI=DA
+2 DO EN^XBNEW("BM1^APCDBMSR","APCDREPI;APCDDATE")
+3 KILL Y
+4 QUIT
BM1 ;EP - called from XBNEW call
+1 SET APCDRFS=""
SET APCDPARS=""
+2 IF '$DATA(^AUPNBMSR(APCDREPI))
SET X=$$BMADD(APCDREPI)
IF 'X
WRITE $PIECE(X,U,2)
QUIT
BM11 ;
+1 SET DIE="^AUPNBMSR("
SET DA=APCDREPI
SET DR="[APCD BM EDIT]"
DO ^DIE
+2 KILL DIE,DA,DR
BM12 ;
+1 ;D FM1
+2 KILL Y
+3 QUIT
+4 ;
PAUSE ;EP
+1 SET DIR(0)="EO"
SET DIR("A")="Press enter to continue...."
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 QUIT
BMADD(P) ;PEP - called to add a patient to the BIRTH MEASUREMENTs file
+1 ;output: DFN (ien of entry, file is dinum)
+2 ; 0^error message if add failed
+3 IF '$GET(P)
QUIT 0_"^patient DFN invalid"
+4 IF '$DATA(^DPT(P))
QUIT 0_"^patient DFN invalid"
+5 IF $DATA(^AUPNBMSR(P,0))
QUIT P
+6 NEW X,DIC,DD,D0,DO,Y
+7 SET X=P
SET DIC="^AUPNBMSR("
SET DIC(0)="L"
+8 KILL DD,D0,DO,DINUM
+9 SET DINUM=X
+10 DO FILE^DICN
+11 IF Y=-1
QUIT 0_"^fileman failed adding patient"
+12 QUIT 1
+13 ;