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

ABPAEEP0.m

Go to the documentation of this file.
ABPAEEP0 ;ENTER/EDIT PVT INS PATIENTS; [ 05/23/91  4:04 PM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
 Q  ;;NOT AN ENTRY POINT
WRITE F ABPAJ=3:1 Q:$P(ABPATEXT,";",ABPAJ)=""  D
 .S @("P"_ABPAJ)=$P(ABPATEXT,";",ABPAJ)
 W ! S DX=P5,DY=P6 S:IOST["QUME" DY=DY+1 X XY W P3,$J(P4,22)
 I $D(P7)=1 W " " W:$D(@P7)=1 @P7
 Q
 ;
REVON S DX=0,DY=13 W ! X XY D EOP^ABPAMAIN W:IOST["QUME" !
 W:$D(ABPARON) @(ABPARON)
 Q
 ;
START D XIT S $P(ABPAL,"-",79)="",$P(ABPALL,"=",79)="" D SCREEN
 D PAT I $D(ABPATDFN)'=1 D XIT Q
 ;
EDIT D REVON W "Select FIELD NUMBER to edit (1 - 4)"
 W:$D(ABPARON)=1 @(ABPAROFF)
 R !,"FIELD NUMBER: ",ABPAI:DTIME I $T=0!(ABPAI["^")!(ABPAI="") G START
 I ABPAI["?" D  G EDIT
 .W "  -- ENTER A NUMBER BETWEEN 1 AND 4" H 3
 I +ABPAI=0!(+ABPAI>4) D  G EDIT
 .W *7,"  -- INVAILID SELECTION" H 3
 S LBL="FLD"_+ABPAI K DIC,DIE,DA,DR,X,Y D @LBL G EDIT
 ;
FLD1 S DA=+ABPATDFN,DIE="^ABPVAO(",DR=.01
 S DIE("NO^")="" D REVON W "Enter the name of the patient"
 W:$D(ABPARON)=1 @(ABPAROFF) D ^DIE W:$D(ABPARON)=1 @(ABPAROFF)
 D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+1) D WRITE
 Q
 ;
FLD2 S DA=+ABPATDFN,DIE="^ABPVAO(",DR=.02
 S DIE("NO^")="" D REVON W "Enter the facility for this patient"
 W:$D(ABPARON)=1 @(ABPAROFF) D ^DIE W:$D(ABPARON)=1 @(ABPAROFF)
 D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+1) D WRITE
 Q
 ;
FLD3 S DA=+ABPATDFN,DIE="^ABPVAO(",DR=.03
 S DIE("NO^")="" D REVON W "Enter the patient's health record number"
 W:$D(ABPARON)=1 @(ABPAROFF) D ^DIE W:$D(ABPARON)=1 @(ABPAROFF)
 D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+1) D WRITE
 Q
 ;
FLD4 S DA=+ABPATDFN,DIE="^ABPVAO(",DR=.04
 S DIE("NO^")="" D REVON W "Enter the patient's social security number"
 W:$D(ABPARON)=1 @(ABPAROFF) D ^DIE W:$D(ABPARON)=1 @(ABPAROFF)
 D:$Y>3 SCREEN S ABPATEXT=$T(PROMPT+1) D WRITE
 Q
 ;
 ;
SCREEN S ABPA("HD",1)=ABPATLE
 S ABPA("HD",2)="ENTER/EDIT PATIENT DATA" D ^ABPAHD
 F ABPAI=1:1 S ABPATEXT=$T(PROMPT+ABPAI) Q:ABPATEXT=""  D WRITE
 W !,ABPALL
 Q
 ;
PAT D REVON W "Enter the NAME of the patient (format = LNAME,FNAME MI.)"
 W:$D(ABPARON)=1 @(ABPAROFF)
 S ABPAPTN="" D ^ABPAPATL
 Q:$D(ABPATDFN)'=1  I +ABPATDFN'>0 D SCREEN G PAT
 S ABPAPNAM=ABPAPAT,ABPAHRN=$P(^ABPVAO(ABPATDFN,0),"^",3)
 S ABPAFAC=$P(^DIC(4,$P(^ABPVAO(ABPATDFN,0),"^",2),0),"^")
 L ^ABPVAO(ABPATDFN):3 I '$T D  H 3 G PAT
 .W *7,!!?5,"<<< PATIENT RECORD UNAVAILABLE AT THIS TIME -- "
 .W "TRY AGAIN LATER >>>"
 D:$Y>3 SCREEN F ABPAI=1:1:3 S ABPATEXT=$T(PROMPT+ABPAI) D WRITE
 Q
 ;
XIT L
 K ABPA,ABPAI,ABPAJ,DIC,X,Y,ABPATDFN,ABPAPNAM,ABPAHRN,ABPAL,ABPALL
 K ABPAFAC,ABPATYPE,ABPAINS,ABPADV,ABPAAMT,ABPADOS,ABPAK,ABPACN,DTOUT
 K DFOUT,DUOUT,DQOUT,DLOUT,ABPAPHNM,ABPAPNUM,ABPAPSSN
 Q
 ;
PROMPT ;;FLD #;TITLE;X-POSITION;Y-POSITION;VARIABLE NAME
 ;;(1)   ;Patient Name:;7;8;ABPAPNAM
 ;;(2)   ;Facility:;7;9;ABPAFAC
 ;;(3)   ;Health Record Number:;7;10;ABPAHRN
 ;;(4)   ;Social Security No.:;7;11;ABPAPSSN