Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCDERAD

APCDERAD.m

Go to the documentation of this file.
APCDERAD ; IHS/CMI/LAB - RAD LOG ENTRY ;
 ;;2.0;IHS PCC SUITE;**2**;MAY 14, 2009
 ;
HDR ;
 W:$D(IOF) @IOF
 F APCDJ=1:1:5 S APCDX=$P($T(TEXT+APCDJ),";;",2) W !?80-$L(APCDX)\2,APCDX
 K APCDJ,APCDX
 W !!
 D ^APCDEIN
 Q:APCDFLG
 S APCDPAT="",APCDRAD=1
 S APCDLOC="" F  D GETLOC Q:APCDLOC=""  S APCDTYPE="" F  D GETTYPE Q:APCDTYPE=""  S APCDCAT="" F  D GETCAT Q:APCDCAT=""  D RESTOFIT
 D EOJ
 Q
 ;
RESTOFIT S APCDDATE="" F  D GETDATE Q:APCDDATE=""  D PROCESS
 Q
 ;
GETLOC ; GET LOCATION OF ENCOUNTER
 S APCDLOC=""
 S DIC="^AUTTLOC(",DIC(0)="AEMQ" D ^DIC K DIC,DA
 Q:Y<0
 S APCDLOC=+Y
 Q
 ;
GETTYPE ; GET TYPE OF ENCOUNTER
 S APCDTYPE=""
 K DTOUT,DUOUT,DIRUT,DIROUT,DIR,DA
 S DIR(0)="9000010,.03O",DIR("A")="TYPE" D ^DIR K DIR
 I $D(DIRUT) S X="" Q
 S APCDTYPE=Y
 K DIR,DIRUT,DIROUT,DTOUT,DUOUT
 Q
 ;
 ;
GETCAT ; GET SERVICE CATEGORY
 S APCDCAT=""
 K DTOUT,DUOUT,DIRUT,DIROUT,DIR,DA
 S DIR(0)="9000010,.07O",DIR("A")="SERVICE CATEGORY" D ^DIR K DIR
 I $D(DIRUT) S X="" Q
 S APCDCAT=Y
 K DIR,DIRUT,DIROUT,DTOUT,DUOUT,DA,X,Y
 Q
 ;
GETDATE ; GET DATE
 W ! S APCDDATE="",%DT="AEPX",%DT("A")="Enter VISIT DATE: " D ^%DT
 Q:Y<0
 S APCDDATE=+Y
 K %DT("A")
 Q
 ;
 ;
PROCESS ; PROCESS MNEMONIC
 D RADLOG Q
 Q
 ;
GETPAT ; GET PATIENT
 D GETPAT^APCDEA
 Q:APCDPAT=""
 I AUPNDOB]"" S X2=AUPNDOB,X1=APCDDATE D ^%DTC S AUPNDAYS=X ; re-set days of age to visit date-dob
 Q
 ;
RADLOG ;
 S X="RADLOG",DIC="^APCDTKW(",DIC(0)="",DIC("S")="I $L($P(^(0),U))>5" D ^DIC K DIC("B"),DIC("A"),DIC("S")
 I Y<0 W !!,$C(7),$C(7),"RAD LOG TEMPLATE MISSING, NOTIFY YOUR SUPERVISOR" Q
 S APCDTPLT=+Y,APCDTPLT("NAME")=$P(Y,U,2)
 S APCDPAT="" F  D GETPAT Q:APCDPAT=""  K APCDADD,APCDALVR D ^APCDEA2,GETMNEK
 Q
GETMNEK ; KILL GETMNE SPECIFIC VARIABLES
 K APCDVSIT
 Q
 ;
EOJ ; END OF JOB
 D ^APCDEKL
 D KILL^AUPNPAT
 K AGE,DFN
 K POP,X,Y,DI,DX,DQ,D,DIG,DIH,DIW,DK,DL,DLOUT
 K APCDRAD,APCDRADT
 K %DT,%
 Q
 ;
TEXT ;
 ;;PCC Data Entry Module
 ;;
 ;;********************************
 ;;*   Radiology Log ENTER Mode   *
 ;;********************************
 ;;