Register a Patient

From VistApedia
Revision as of 02:53, 2 April 2005 by 68.171.114.173 (talk) (Kevin's Add / Edit Patient Method)
Jump to: navigation, search

Kevin's Add / Edit Patient Method

 EDITPT(AddOK)
       ;"Purpose: To ask for a patient name, and then allow editing
       ;"Input: AddOK: if 1, then adding new patients is 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 VET=$select($data(^DPT(DFN,"VET")):^("VET")'="Y",1:0)
 
       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

Misc Configuration Scripts

(Registering a patient)


Contents


Notes

Adding a Menu to Register a Patient
Overview of Registering a Patient
Installing CIRN and the MPI Infrastructure

Editor's Notes:


This was sent to me by Nancy Anthracite. I was searching for a way to register a patient--i.e. how to add a new patient to the system. She wrote "Kevin - I think this stuff may already be installed, but the second section will explain some of what you want to know. -Nancy".


These example scripts are run on a Cache' system. I assume that the steps will be applicable to GT.M


[Back to Contents]




Assigning a Menu to Register a Patient


[Back to Contents]


In order to register a patient, you can use your powers as System Manager with all of the keys to do it, but instead, you can set up a Director of Admissions who has the ability to work with the MASTER PATIENT INDEX/PATIEND DEMOGRAPHICS (MPI/PD) system and register a patient. This Director of Admissions was give access to three menus as indicated below, the last of which allows registration of a patient. Throughout this document BOLD RED indicates user input.


VISTA>D ^ZU

Volume set: VISTA:CACHEWEB UCI: VISTA Device: |TRM|:|4052 (TRM:)


ACCESS CODE: *******


VERIFY CODE: ********


Good afternoon MANAGER,SYSTEM


You last signed on Jun 2,2003 at 00:0


Select TERMINAL TYPE NAME: C-VT100//


Digital Equipment Corporation VT-100 video


WARNING -- TASK MANAGER DOESN'T SEEM TO BE RUNNING!!!!


Select Systems Manager Menu Option: FM VA FileMan


VA FileMan Version 22.0


Select VA FileMan Option:


Select VA FileMan Option: ENTER or Edit File Entries


INPUT TO WHAT FILE: NEW PERSON//


EDIT WHICH FIELD: ALL// PRIMARY MENU OPTION


THEN EDIT FIELD: SECONDARY MENU OPTIONS (multiple)


EDIT WHICH SECONDARY MENU OPTIONS SUB-FIELD: ALL//


THEN EDIT FIELD:


Select NEW PERSON NAME: DA ADMISSIONS,DIRECTOR DA


PRIMARY MENU OPTION: MPI/PD MASTER MENU RGMGR MPI/PD Mast


er Menu


Select SECONDARY MENU OPTIONS: RG ADMIN COORD MENU MPI/PD Patient Admin Coordinator Menu


Are you adding 'RG ADMIN COORD MENU' as


a new SECONDARY MENU OPTIONS (the 1ST for this NEW PERSON)? No// Y (Yes)


SYNONYM: CORD


Select SECONDARY MENU OPTIONS: RG ADMIN COORD MENU


// DG REGISTRATION MENU Registration Menu


Are you adding 'DG REGISTRATION MENU' as


a new SECONDARY MENU OPTIONS (the 2ND for this NEW PERSON)? No// Y (Yes)


SYNONYM: REGM


Select SECONDARY MENU OPTIONS:


///




Overview of Registering a Patient


[Back to Contents]


When you actually register your test patient, it might be helpful to you to know some information and terminology. All test patients in the VistA system at the VA are given social security numbers beginning with 5 zeros. These are recognized as test patients and automatically excluded from any uploads to central patient directories. Patients may also be given pseudo social security numbers in some circumstances, for instance, when the SS number is not known.


Information about PSEUDO SOCIAL SECURITY NUMBERS can be found by typing ?? at the prompt to enter the social security number when you are registering a patient. If you just enter a number followed by a P, that will also give you more information as the system will admonish you for not doing it right and tell you what to do. If you still don't do it correctly, the Pseudo SS number will be generated for you.


The most important fields used in keeping track of patients in the VA are the NAME, SS#, DOB (Date of Birth) and (DFN - file number of some sort??). If you follow this convention, it is likely to help you utilize the more advanced features for finding patients in other clinics, etc., if you ever utilize this system in a grand scale. It is also recommended that auditing be done AT LEAST of changes in these fields and SEX. (Auditing is discussed later on in this document.)


When registering a new patient, an attempt will be made to access the MPI (Master Patient Index) which, for the VA, is a centralized master patient file in Austin, Texas. You will also see mention of the CMOR (Coordinating Master of Record), which is the main site where a patient receives care and where the main record of the patient is maintained. There is also the ICN - the Integration Control Number - which is like a patient number that can be assigned locally or where the Master Patient Index is maintained (i.e., Austin for the VA).




Installing CIRN and the MPI Infrastructure


Checking the Patch Level

Checking for RG* Globals
Unmapping routines
Journaling
Find the Value of a Field in a File
Be sure DUZ(0)=@ and U="^"
Proceed with the KIDS installation


[Back to Contents]


You may simply register a patient using this assigned menu, but because it may not be desirable to use social security numbers for patient identifiers within a medical care system, documentation of how to install the Master Patient Index system short of actually having it contact Austin , Texas follows. This will allow for the generation of ICNs that have the first 3 numbers as identifiers of the location where the patient was registered. This would be useful with a medical care system with multiple clinics, etc., as it might help to keep track of patients from various clinics if they are gathered in one central database. This is the equivalent of installing the test account for the Clinical Information Resource Network - Patient Demographics (CIRN-PD) and the Master Patient Index (MPI).


Installing the test account is the same as installing the full system except that the patch HL*1.6*39 is not installed. That is the patch that actually allows the system to contact Austin, Texas where the central VA Master Patient index is maintained. HL*1.6*39 must not be installed or your system will sending unwanted information to the VA MPI in Austin.


The installation of this system is documented in the Clinical Information Resource Network Patient Demographiscs (CIRN-PD) and Master Patient Indes (MPI) Installation and Implementation Guide, Version 2, Package Version 1.0, August 2000, Draft which can be found at : http://www.va.gov/vdl/VistA_Lib/Infrastructure/Master_Patient_Index_(MPI)/rg1_0_ig2.doc a.k.a


You will need to obtain these instructions as this document is made to supplement that document to allow "newbies" to use the official instructions.


Checking the Patch Level [back]


Beginning right on page 1 of the manual, you will need to check the patch level of various packages listed to be sure they are patched as they should be. Vista Platinum is patched to the current level in almost all packages, so this is unlikely to be a problem, but you will need to check. This is done by assigning yourself the XPD PRINT PACKAGE PATCHES, or Display Patches for a Package as a Secondary Menu. Assuming you have followed the prior documentation and are now the SM or "Manager, System" with all of the keys assigned, you will assign this menu to yourself in the New Person file, secondary menu field as follows (except the KIDS synonym may already be entered for you):


VISTA>D Q^DI

VA FileMan 22.0


Select OPTION: ENTER OR EDIT FILE ENTRIES


INPUT TO WHAT FILE: HL LOGICAL LINK// 200 NEW PERSON (8 entries)


EDIT WHICH FIELD: ALL// SECONDARY MENU OPTIONS (multiple)


EDIT WHICH SECONDARY MENU OPTIONS SUB-FIELD: ALL// SYNONYM


THEN EDIT SECONDARY MENU OPTIONS SUB-FIELD: (Hit enter here)


THEN EDIT FIELD:(Hit enter here)


Select NEW PERSON NAME: SM MANAGER,SYSTEM SM Clinical Coordinator


Select SECONDARY MENU OPTIONS: // XPD PRINT PACKAGE PATCHES Display Patches for a Package


...OK? Yes// (Hit enter here) (Yes)


//


SYNONYM: // KIDS


Select SECONDARY MENU OPTIONS: ^


On page 1 and 2 is a table with a list of the packages and patches. You will need to go into the programmers prompt, select the secondary menu and list the patches for the patches. The tricky part is how you ask for the packages. In the order that they appear, I have listed what you type in to get the package you want at the prompt "Select PACKAGE NAME." There doesn't seem to be any rhyme or reason to whether you need to enter the package namespace like XT or whether you enter a name like Clinical Info Resource Network. The table below has the VA Application name on the left and what you need to type at the prompt on the right. The way to figure out what to try is to look at the file custody document and the namespaces document in the software directory on ftp://ftp.va.gov/vista/software .



Application Name in pg. 1 & 2


What to enter at Select PACKAGE NAME:



CIRN


CLINICAL INFO RESOURCE NETWORK



Scheduling


SCHEDULING



PIMS


DG REGISTRATION



Hl7


HL



MailMan


MAILMAN



Kernel


XU KERNEL



Kernel Toolkit


XT



VA Fileman


VA FILEMAN



Extensible Editor


RGED - Not included in Platinum Release 4/2003*



Run Time Library


RGUT



Pharmacy


PHARMACY



Inpatient Medications


PSJ



Outpatient Pharmacy


PSO


  • It was removed with patch RGED*2.6*1 in Aug. 2001 because it contained a global with control characters. See the below for more information. Thanks to Fil Beza for providing this information.

PATCH NUMBER: RGED*2.6*01 PACKAGE NAME: EXTENSIBLE EDITOR


SUBJECT: EXTENSIBLE EDITOR - ELIMINATION OF PACKAGE


DATE APPLIED TO PRODUCTION: AUG 21, 2001@20:18:16


DATE ENTERED: AUG 13, 2001 DATE VERIFIED: OCT 02, 2001


PACKAGE NAMESPACE: RGED SEQUENCE NUMBER: 1


PRIORITY: MANDATORY


TEXT OF PATCH:


=================================================================

Run Date: OCT 02, 2001 Designation: RGED*2.6*1


Package : RGED - EXTENSIBLE EDITOR Priority: Mandatory


Version : 2.6 SEQ #1 Status: Released


=================================================================

Subject: EXTENSIBLE EDITOR - ELIMINATION OF PACKAGE


Category:


- Routine


- Other


Description:


==

Installation of patch RGED*2.6*1 is OPTIONAL.


Extensible Editor 2.6 was initially released to support


functionality within Master Patient Index/Patient Demographics


(MPI/PD) 1.0. The dependencies by MPI/PD on the Extensible Editor


product have been eliminated. All formal integration agreements


have been retired. Extensible Editor 2.6 is no longer supported


nationally, making it Class II software. If you choose to do so,


you can install patch RGED*2.6*1 to remove the Extensible Editor


package from VistA. This is a local decision, and the installation


of this patch is OPTIONAL.


It is STRONGLY recommended that all facilities install this patch.


The Extensible Editor application contains a global that has embedded


control characters. This violates the VA Standards and Conventions


(SAC) and it is also in violation of the current ANSI MDC X11.1


Portability Standards.


The following demonstrates starting the job described above:


VISTA>D ^XUP

Setting up programmer environment


Terminal Type set to: C-VT100


Select OPTION NAME: EVE


1 EVE Systems Manager Menu


2 EVENT CAPTURE (ECS) EXTRACT AU ECX ECS SOURCE AUDIT Event Capture


(ECS) Extract Audit


3 EVENT CAPTURE DATA ENTRY ECENTER Event Capture Data Entry


4 EVENT CAPTURE EXTRACT ECXEC Event Capture Extract


5 EVENT CAPTURE MANAGEMENT MENU ECMGR Event Capture Management Menu


Press <RETURN> to see more, '^' to exit this list, OR


CHOOSE 1-5: 1 EVE Systems Manager Menu


WARNING -- TASK MANAGER DOESN'T SEEM TO BE RUNNING!!!!


Select Systems Manager Menu Option: KIDS Display Patches for a Package


Select PACKAGE NAME: CLINICAL INFO RESOURCE NETWORK RG


Select VERSION: 1.0// (Hit enter here) 04-28-99


Do you want to see the Descriptions? NO// (Hit enter here)


DEVICE: // HOME CONSOLE


PACKAGE: CLINICAL INFO RESOURCE NETWORK Jun 19, 2003 4:54 pm PAGE 1


PATCH # INSTALLED INSTALLED BY




VERSION: 1.0 JUN 28, 1999 MANAGER,SYSTEM


2 SEQ #1 OCT 19, 1999 MANAGER,SYSTEM


1 SEQ #2 JAN 25, 2000 MANAGER,SYSTEM


3 SEQ #3 MAY 25, 2000 MANAGER,SYSTEM


4 SEQ #4 JUL 24, 2000 MANAGER,SYSTEM


7 SEQ #5 AUG 24, 2000 MANAGER,SYSTEM


5 SEQ #6 SEP 05, 2000 MANAGER,SYSTEM


8 SEQ #7 OCT 04, 2000 MANAGER,SYSTEM


6 SEQ #8 OCT 27, 2000 MANAGER,SYSTEM


9 SEQ #9 NOV 27, 2000 MANAGER,SYSTEM


11 SEQ #10 NOV 27, 2000 MANAGER,SYSTEM


10 SEQ #11 JAN 03, 2001 MANAGER,SYSTEM


14 SEQ #12 FEB 28, 2001 MANAGER,SYSTEM


15 SEQ #13 FEB 28, 2001 MANAGER,SYSTEM


12 SEQ #14 APR 05, 2001 MANAGER,SYSTEM


16 SEQ #15 APR 05, 2001 MANAGER,SYSTEM


Enter RETURN to continue or '^' to exit:


///


Checking for RG* Globals [back]


The next job is to see if you need to place the RG* globals in the system. For this, check in Cache explorer to see if they are there. The following screen captures show how that is done.


Go to the Cache Cube, Click on Cache explorer, choose namespace VISTA and then Globals.





Now expand the list of globals by clicking on it and look for the RG* globals (^RGSITE, ^RGHL7, ^RGEQASN, RGEQEXC, ^RGSTAT, and ^RGEQ). You will see that in this version of VistA Platinum, they are present, but they are not mapped to a namespace because they are already in the vista namespace where they need to be. I have selected them in the screen capture below to make it easier to see.




Unmapping routines [back]


Next you are asked to find out if any of the routines listed on page 5 of the manual are mapped. This is not necessary to do that for Cache on Windows.


Journaling [back]


On page 5 you are asked to turn off journaling for ^RG* during the installation and then re-enabled. You are also advised to read patch HL*1.6*52 recommendations about global journaling. This is how that is done in Cache.


Locate the Namespace where ^RG* is translated. This will display whether journaling is enabled or not. Note Jrn column for Journaling. This will show listings for 300+ globals. Excerpts are shown below.


D ^%GD

Device: Right margin: 80=>


Show detail? No => YES


Global Directory Display of VISTA


4:26 PM Jun 20 2003


Global Vacant Own Grp Wld Net Growth 1st PB Jrn Keep


^%Z RWD R R RWD 2300 1120 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^%ZIS RWD R R RWD 2300 6 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


///


///


^RGEQ RWD N N RWD 2300 1014 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^RGEQASN RWD N N RWD 2300 1015 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^RGEQEXC RWD N N RWD 2300 1016 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^RGHL7 RWD N N RWD 2300 1017 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^RGSITE RWD N N RWD 2300 1018 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^RGSTAT RWD N N RWD 2300 1019 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


^RMPF RWD N N RWD 2300 1020 N N


Data Location: c:\cachesys\mgr\vista\


Lock Location: c:\cachesys\mgr\vista\


Replications:


Collation: Cache standard


///


To later turn Journaling on or off, use D ^%JOURNAL and enable/disable journaling as needed. In this case, Journaling was already disabled so no change was made when a request was made to disable it.


USER>D ^%CD

Namespace: VISTA


You're in namespace VISTA


Default directory is c:\cachesys\mgr\vista\


VISTA>D ^%JOURNAL


Enable or Disable journaling of a set of globals.


Do you want to Enable or Disable journaling? (E or D) E=> D


All Globals? No => NO


Global ^RG*


6 items selected from


313 available globals


Global ^


Global ^RGEQ No change


Global ^RGEQASN No change


Global ^RGEQEXC No change


Global ^RGHL7 No change


Global ^RGSITE No change


Global ^RGSTAT No change


VISTA>


USER>D ^%CD


To find out what patch HL*1.6*52 says about globals, follow the instructions for checking for patches and check for patches to HL and say yes to "Do you want to see the descriptions" instead of just hitting enter to accept the "No" default.


Find the Value of a Field in a File [back]


Another task you will be asked to do is to find the contents of File #870, Field #21. This turns out not to be as simple an exercise as it might seem. At first blush, one might just decide to use the entry point D Q^DI, inquire into the contents of file 870 and then field 21. This is an excerpt of what you happen when you do that.


VISTA>D Q^DI

VA FileMan 22.0


Select OPTION: INQUIRE TO FILE ENTRIES


OUTPUT FROM WHAT FILE: NEW PERSON// 870 HL LOGICAL LINK


(183 entries)


Select HL LOGICAL LINK NODE: ??


Choose from:


AMB-CARE


DGMST-SEND


EPI-LAB


HUI PROV


///


(All 183 entries are here and none of them are likely to have anything to do with what you have entered so far in you install of VistA Platinum in a non-VA setting)


////


XUMF TEST


YS GAF-SND


Select HL LOGICAL LINK NODE:


You need to find out what the entry is for your site, and at the moment, you do not have a location number for this job site because you presumably are not at VA hospital of clinic. This is NOT the same number you assigned in step 78 and 79 of Chapter 1 of the installation instructions. Notice that the next to the last entry is XUMF TEST. You can use this for now and add your site as an entry later. What follows is the output you will get for XUMF TEST if you say YES to STANDARD CAPTION OUTPUT.


Select HL LOGICAL LINK NODE: XUMF TEST

ANOTHER ONE:


STANDARD CAPTIONED OUTPUT? Yes// Y (Yes)


Include COMPUTED fields: (N/Y/R/B): NO// BOTH Computed Fields and Record Number


(IEN)


NUMBER: 175 NODE: XUMF TEST


LLP TYPE: TCP QUEUE SIZE: 10


RE-TRANSMISSION ATTEMPTS: 5 ACK TIMEOUT: 600


EXCEED RE-TRANSMIT ACTION: shutdown TCP/IP ADDRESS: 10.4.229.23


TCP/IP PORT: 5000 TCP/IP SERVICE TYPE: CLIENT (SENDER)


This is what you get if you say NO to STANDARD CAPTION OUTPUT and ask for field #21.


OUTPUT FROM WHAT FILE: HL LOGICAL LINK//

Select HL LOGICAL LINK NODE: XUMF TEST


ANOTHER ONE:


STANDARD CAPTIONED OUTPUT? Yes// NO (No)


FIRST PRINT FIELD: 21 QUEUE SIZE


THEN PRINT FIELD:


Heading (S/C): HL LOGICAL LINK LIST Replace


DEVICE: CONSOLE Right Margin: 80//


HL LOGICAL LINK LIST JUN 20,2003 08:49 PAGE 1


QUEUE


SIZE




10


Be sure DUZ(0)=@ and U="^" [back]


To do this, enter ZW at the Vista prompt after you have entered using the programmers environment using D ^XUP. I have shown you the output both before and after D ^XUP below. Note DUZ(0) and U are correct.


USER>D ^%CD

Namespace: VISTA


You're in namespace VISTA


Default directory is c:\cachesys\mgr\vista\


VISTA>ZW


VISTA>D ^XUP


Setting up programmer environment


Access Code:


Terminal Type set to: C-VT100


Select OPTION NAME: ^PG


VISTA>ZW


DT=3030623


DTIME="600"


DUZ=1


DUZ("0")="@"


DUZ("1")=""


DUZ("2")=1


DUZ("AG")="V"


DUZ("BUF")=1


DUZ("LANG")=""


IO="|TRM|:|3288"


IO("0")="|TRM|:|3288"


IO("1","|TRM|:|3288")=""


IO("ERROR")=""


IO("HOME")="5^|TRM|:|3288"


IO("ZIO")="TRM:"


IOBS="$C(8)"


IOF="#,$C(27,91,50,74,27,91,72)"


IOM=80


ION="CONSOLE"


IOS=5


IOSL="24"


IOST="C-VT100"


IOST(0)=9


IOT="VTRM"


IOXY="W $C(27,91)_((DY+1))_$C(59)_((DX+1))_$C(72)"


U="^"


XQXFLG="^^XUP"


VISTA>


Proceed with the KIDS installation [back]


For this you will need to find RG_1_0.KID which is located at


[Back to Contents]