AZXAFMTS ; IHS/PHXAO/TMJ - driver for primary care provider report ;
;;2.0;RELEASE OF INFORMATION;;FEB 21, 2002
;
W:$D(IOF) @IOF
W !,"This report will generate a list of patients for a specific Primary Care"
W !,"Provider or a list of patients for all Primary Care Providers at this facility."
I '$G(DUZ(2)) W !!!,$C(7),$C(7),"SITE NOT SET IN YOUR USER PROFILE! Please notify your Site Manager!" Q
ASK ;
;
S DIC="^DPT(",DIC("A")="Enter PATIENT NAME: ",DIC(0)="AEMQ" D ^DIC K DIC
I Y=-1 G ASK
S APCLPROV=+Y
S PATNAME=$P(^DPT(APCLPROV,0),U)
DIP ;
S DIC="^AUPNPAT("
S FLDS="[TMJ JUMP PRINT]",BY="[TMJ JUMP SORT]"
;S FR=PATNAME,TO=PATNAME
K DHIT,DIOEND,DIOBEG
D EN1^DIP
DONE ;
S DIR(0)="EO",DIR("A")="End of report. Hit return" D ^DIR K DIR S:$D(DUOUT) DIRUT=1 I $D(IOF) W @IOF
EOJ ;clean up
K DIRUT,DUOUT,X,Y,DIR,FLDS,DIP,BY,TO,FR,DIC,DHD
K APCLPROV
Q
AZXAFMTS ; IHS/PHXAO/TMJ - driver for primary care provider report ;
+1 ;;2.0;RELEASE OF INFORMATION;;FEB 21, 2002
+2 ;
+3 IF $DATA(IOF)
WRITE @IOF
+4 WRITE !,"This report will generate a list of patients for a specific Primary Care"
+5 WRITE !,"Provider or a list of patients for all Primary Care Providers at this facility."
+6 IF '$GET(DUZ(2))
WRITE !!!,$CHAR(7),$CHAR(7),"SITE NOT SET IN YOUR USER PROFILE! Please notify your Site Manager!"
QUIT
ASK ;
+1 ;
+2 SET DIC="^DPT("
SET DIC("A")="Enter PATIENT NAME: "
SET DIC(0)="AEMQ"
DO ^DIC
KILL DIC
+3 IF Y=-1
GOTO ASK
+4 SET APCLPROV=+Y
+5 SET PATNAME=$PIECE(^DPT(APCLPROV,0),U)
DIP ;
+1 SET DIC="^AUPNPAT("
+2 SET FLDS="[TMJ JUMP PRINT]"
SET BY="[TMJ JUMP SORT]"
+3 ;S FR=PATNAME,TO=PATNAME
+4 KILL DHIT,DIOEND,DIOBEG
+5 DO EN1^DIP
DONE ;
+1 SET DIR(0)="EO"
SET DIR("A")="End of report. Hit return"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
IF $DATA(IOF)
WRITE @IOF
EOJ ;clean up
+1 KILL DIRUT,DUOUT,X,Y,DIR,FLDS,DIP,BY,TO,FR,DIC,DHD
+2 KILL APCLPROV
+3 QUIT