Hi
I had a different problem but somewhat relating to
the one you specified.
According to the scenario here, the patients are
identified by an OPD number
(which is a combination of two fields TYPE OF
PATIENT and a serial number).
I wanted the registration procedure to ask the OPD
number to identify the
patient and not the name, etc.. I was partly
successful in doing it. That
is, I was able to make the procedure ask for OPD
number but could not
override the basic details of a patient, required by
VistA, while adding a
new one. It would never go to the ScreenMan form
before taking the NAME,
DATE OF BIRTH, SSN, etc. in roll and scroll mode.
Is there any way of overriding/editing this set of
required fields?
Usha
----- Original Message -----
From: "Kevin Toppenberg" <[EMAIL PROTECTED]>
To: "Hardhats Sourceforge"
<hardhats-members@lists.sourceforge.net>
Sent: Monday, February 14, 2005 6:33 AM
Subject: [Hardhats-members] Adding / Editing
patients
Hey all,
I have some code to offer othes here (if they want
it), and some thoughts and questions.
First, I wrote some custom code that bulk-created
patient records in the PATIENT file. I ported
over
around 70,000 patients. Now, as I use these
patients,
I am finding that some tweeking needs to be
done...
ie. completing the records etc. So I have been
trying
to decide how best to edit this data. I am
comfortable now doing it directly in Fileman. But
that wouldn't be good for my receptionists. So I
looked at the DG REGISTER... menus. And there I
ran
into the same problem that Nick was having about
the
system trying to connect to the MPI. Plus, it was
getting to way too many questions (i.e. it was
getting
ready to admit a patient into the hospital),
rather
than just editing the patient record.
So I have cut, pasted, and trimmed down this code
(originally from DGREG.m) to make the following
function. It can be called with a parameter=1 if
adding new patients is to be allowed. Here is the
code. And FYI, it uses a standard VistA screenman
based system of editing. (Questions below)
EDITPT(AddOK)
;"Purpose: Ask for patient name, and allow
editing
;"Input: AddOK: if 1, adding new patients
allowed
;"Result: none
do LO^DGUTL
set DGCLPR=""
new DGDIV set DGDIV=$$PRIM^VASITE
if DGDIV>0 set
%ZIS("B")=$piece($get(^DG(40.8,+DGDIV,"DEV")),U,1)
kill %ZIS("B")
if '$data(DGIO),$piece(^DG(43,1,0),U,30) do
. set %ZIS="N",IOP="HOME"
. do ^%ZIS
A do ENDREG^DGREG($get(DFN))
do if (Y<0) goto EditDone
. W !!
. if $get(AddOK)=1 do
. . set DIC=2,DIC(0)="ALEQM"
. . set DLAYGO=2
. else do
. . set DIC=2,DIC(0)="AEQM"
. . set DLAYGO=0
. kill DIC("S")
. do ^DIC
. kill DLAYGO
. if Y<0 quit
. set (DFN,DA)=+Y
. set DGNEW=$P(Y,"^",3)
. new Y
. do PAUSE^DG10
. do BEGINREG^DGREG(DFN)
. if DGNEW D NEW^DGRP
if +$get(DGNEW) do
. ;" query CMOR for Patient Record Flag
Assignments
if NEW patient and
. ;" display results.
. if $$PRFQRY^DGPFAPI(DFN) do DISPPRF^DGPFAPI(DFN)
set (DGFC,CURR)=0
set DA=DFN
set DGFC="^1"
set
set %ZIS="N",IOP="HOME"
do ^%ZIS
set DGELVER=0
;"do EN^DGRPD
;"if $data(DGRPOUT) do goto A
;". do ENDREG^DGREG($G(DFN))
;". do HL7A08^VAFCDD01
;". kill DFN,DGRPOUT
;"do HINQ^DG10
if $D(^DIC(195.4,1,"UP")) if ^("UP") do ADM^RTQ3
do REG^IVMCQ($G(DFN)) ;" send financial query
set DGRPV=0
do EN1^DGRP
EditDone
quit
OK, the next issue I need to solve is the actual
addition of a NEW patient (i.e. LAYGO). If I
supply a
new name of a patient, it asks if I want to add a
new
patient. If I say YES, it goes into roll and
scroll
mode, asking many more questions than my setting
needs, and only comes back to the screenman
("nicer")
editing screens after aborting with a "^" (and, oh
by
the way, you have to know how many questions you
have
to answer before jumping out, or the record is not
created).
So It seems that an input template might help
here.
But how would I tell ^DIC to use an input template
in
event of Laygo?
Thanks
Kevin
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com